feat(source-hubspot): add list_memberships stream using V3 Lists API#75545
feat(source-hubspot): add list_memberships stream using V3 Lists API#75545devin-ai-integration[bot] wants to merge 4 commits intomasterfrom
Conversation
Add a new list_memberships stream as a substream of contact_lists_stream
using HubSpot's V3 Lists API (GET /crm/v3/lists/{listId}/memberships).
- Implements cursor-based pagination with after parameter
- Uses SubstreamPartitionRouter to iterate over parent contact lists
- Adds listId via AddFields transformation for composite primary key
- Includes unit tests for basic read and pagination
- Bumps version to 6.53.0 (manifest) / 6.4.0 (docker)
Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: bot_apk <apk@cognition.ai>
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
|
Deploy preview for airbyte-docs ready! ✅ Preview Built with commit 6198f97. |
|
Co-Authored-By: bot_apk <apk@cognition.ai>
|
↪️ Triggering Reason: Draft PR with CI all green (36/36), adds new list_memberships stream to source-hubspot per oncall feature request. Advancing through pipeline. |
|
Fix Validation EvidenceOutcome: Fix/Feature Proven Successfully Evidence SummaryRegression tests comparing the PR version against baseline (6.3.3) passed all four commands (spec, check, discover, read). The new Next Steps
Connector & PR DetailsConnector: Evidence PlanProving Criteria
Disproving Criteria
Cases Attempted
Pre-flight Checks
Detailed Evidence Log2026-03-28T11:50Z — Initial status comment posted to PR Regression Test Results:
Note: Connection IDs and detailed logs are recorded in the linked private issue. |
|
Reviewing PR for connector safety and quality.
|
AI PR Review ReportReview Action: NO ACTION (NOT ELIGIBLE)
📋 PR Details & EligibilityConnector & PR InfoConnector(s): Auto-Approve EligibilityEligible: No Review Action DetailsNO ACTION (NOT ELIGIBLE) — All gates pass but the PR is not eligible for auto-approval because it contains functional code changes (new stream). No PR review submitted. Human review required.
🔍 Gate Evaluation DetailsGate-by-Gate Analysis
📚 Evidence ConsultedEvidence
|
What
Adds a new
list_membershipsstream to source-hubspot, replacing thecontacts_list_membershipsstream that was removed in v5.0.0 (PR #59673) due to HubSpot's V1 Contacts API deprecation. The new stream uses HubSpot's V3 Lists API endpoint (GET /crm/v3/lists/{listId}/memberships).Resolves https://github.com/airbytehq/oncall/issues/11812:
Related: #75544
How
list_memberships_streamas a substream of the existingcontact_lists_streamusingSubstreamPartitionRouterlistIdvalues via partition routing; the child stream hitsGET /crm/v3/lists/{listId}/membershipsfor each listafterparameter (readspaging.next.afterfrom response)listIdis injected into each record via anAddFieldstransformation to form a composite primary key[listId, recordId]listId,recordId, andmembershipTimestampReview guide
airbyte-integrations/connectors/source-hubspot/manifest.yaml— New stream definition (lines ~1173-1224), stream registration (line ~2029), and inline schema (lines ~2547-2566). Key areas:SubstreamPartitionRouterwiring tocontact_lists_streamafter)AddFieldstransformation that injectslistIdairbyte-integrations/connectors/source-hubspot/unit_tests/test_streams.py— Two new tests: basic multi-list read and pagination handlingairbyte-integrations/connectors/source-hubspot/unit_tests/test_source.py— Updated stream count assertions (34→35, 35→36) to account for the new streamairbyte-integrations/connectors/source-hubspot/metadata.yaml— dockerImageTag bumpdocs/integrations/sources/hubspot.md— Changelog entry for 6.4.0Items worth extra scrutiny:
listIdschema type isstring, but theAddFieldsJinja template ({{ stream_partition['list_id'] }}) may inject it as an integer depending on the parent record type. The unit tests usestr()casts to work around this. Reviewer: please verify this won't cause schema validation issues in production. If it does, a| stringJinja filter should be added to the template.stop_conditionon the paginator — it relies oncursor_valueevaluating toNonewhenpaging.nextis absent. This follows the existingcursor_paginatorpattern in the manifest but is worth confirming.User Impact
Users gain a new
list_membershipsstream that provides list membership data (which record IDs belong to which lists) via HubSpot's V3 Lists API. This partially restores functionality lost whencontacts_list_membershipswas removed in v5.0.0. The new stream requires thecrm.lists.readOAuth scope (same as the existingcontact_listsstream).This is a purely additive change — no existing streams or schemas are modified.
Can this PR be safely reverted and rolled back?
Link to Devin session: https://app.devin.ai/sessions/a0d512382922491b824193ec1ca56253