Skip to content

fix(low-code): send HttpComponentsResolver partition router request options and support AsyncRetriever - #1195

Merged
Baz (bazarnov) merged 2 commits into
mainfrom
bazarnov/fix-http-components-resolver-partition-router
Oct 2, 2026
Merged

Baz (bazarnov) merged 2 commits into
mainfrom
bazarnov/fix-http-components-resolver-partition-router

Conversation

@bazarnov

@bazarnov Baz (bazarnov) commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

create_http_components_resolver builds the resolver retriever with only the pre-#707 stream_slicer= kwarg. Since #707 (v7.0.0), create_simple_retriever takes the partition router as partition_router and uses it as the request options provider, so:

  1. A request_option on the resolver retriever's partition router is silently dropped.
  2. An AsyncRetriever resolver retriever, which the schema allows, fails discovery with KeyError: 'requester' (the use_cache override). Past that, the resolver iterates the partition router instead of the job slices and would treat the slice log message as component values.

Changes

  • create_http_components_resolver builds the partition router once and passes it as stream_slicer and partition_router, like create_default_stream. The resolver iterates the same instance, or the AsyncRetriever's job slicer.
  • HttpComponentsResolver.resolve_components skips AirbyteMessage items (the AsyncRetriever slice log), as DynamicSchemaLoader does since fix(low-code): support AsyncRetriever in DynamicSchemaLoader #974.
  • ConcurrentDeclarativeSource and the legacy ManifestDeclarativeSource set use_cache only on a resolver retriever that has a requester. Async job requesters stay uncached, so polling never replays a stale job status.

Compatibility

  • Monorepo: 3 connectors use HttpComponentsResolver (source-airtable, source-google-sheets, source-hubspot), all with a SimpleRetriever and no request_option on its partition router. Their resolver requests (method, URL, headers, body) are identical on main and on this branch, and the resolved streams are the same.
  • Manifests that declare a request_option on the resolver retriever's partition router send it again, as before v7.0.0. If the requester also sets the same key, combine_mappings now raises on the duplicate, and ignore_stream_slicer_parameters_on_paginated_requests now applies.
  • An AsyncRetriever resolver is not cached, so each resolution creates a job. check and the Connector Builder resolve twice per process, so they create two jobs, as DynamicSchemaLoader with an AsyncRetriever does (fix(low-code): support AsyncRetriever in DynamicSchemaLoader #974).

Tests

In resolvers/test_http_components_resolver.py, end to end through ConcurrentDeclarativeSource and HttpMocker:

  • test_dynamic_streams_with_http_components_resolver_partition_router_request_option: the resolver request carries ?p=p1.
  • test_dynamic_streams_with_http_components_resolver_async_retriever: creates, polls and downloads a job. The resolved streams are item_1 and item_2, with none from the slice log.

Both fail on main. A mutation of each change on the ConcurrentDeclarativeSource path fails at least one of them. The legacy use_cache guard is the same one-line change and has no test of its own. unit_tests/sources/declarative/{resolvers,parsers,retrievers,schema} and unit_tests/legacy: 717 passed.

Release note

Dynamic-stream resolvers send their partition router's request_option again, as before 7.0.0. If a resolver's requester hard-codes the same key in request_parameters, request_headers or request_body_json, remove it from the requester.

Fixes #1181

@bazarnov
Baz (bazarnov) requested a review from a team as a code owner October 2, 2026 09:16
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This CDK Version

You can test this version of the CDK using the following:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@bazarnov/fix-http-components-resolver-partition-router#egg=airbyte-python-cdk[dev]' --help

# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch bazarnov/fix-http-components-resolver-partition-router

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /prerelease - Triggers a prerelease publish with default arguments
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

PyTest Results (Fast)

4 972 tests  +2   4 960 ✅ +2   10m 51s ⏱️ + 2m 21s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 17571bf. ± Comparison against base commit c756dce.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

PyTest Results (Full)

4 975 tests  +2   4 963 ✅ +2   15m 55s ⏱️ -1s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 17571bf. ± Comparison against base commit c756dce.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. The wiring matches create_default_stream, and I probed 8 resolver shapes at this head vs main: the three monorepo users (airtable, google-sheets, hubspot — Substream/no router, no request_option) send identical requests and resolve the same streams; router request_options are sent per partition again as in 6.x; an AsyncRetriever resolver creates/polls/downloads a job where main raises KeyError: 'requester'; failed/timeout jobs during discover raise a traced system_error and free their tracker slots. Both new tests fail on main, and 4 of 5 production hunks are killed by a mutation (the legacy guard is the known exception).

One inline note on the release surface for the key-collision case — it is a scan plus a sentence, not a code change.

@bazarnov
Baz (bazarnov) merged commit 9dba046 into main Oct 2, 2026
27 of 28 checks passed
@bazarnov
Baz (bazarnov) deleted the bazarnov/fix-http-components-resolver-partition-router branch October 2, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HttpComponentsResolver drops partition router request options and cannot use AsyncRetriever

2 participants