Skip to content

fix: pass stream_slicer when creating retriever in DynamicSchemaLoader#974

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1775066638-fix-dynamic-schema-loader-async-retriever
Open

fix: pass stream_slicer when creating retriever in DynamicSchemaLoader#974
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1775066638-fix-dynamic-schema-loader-async-retriever

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

create_dynamic_schema_loader in ModelToComponentFactory failed with TypeError: missing 1 required keyword-only argument: 'stream_slicer' when the retriever was an AsyncRetriever. This is because AsyncRetriever requires stream_slicer as a keyword-only argument, but only partition_router was being passed.

The fix passes both stream_slicer and partition_router when creating the retriever, mirroring the existing pattern in create_default_stream (line ~2086).

Resolves https://github.com/airbytehq/oncall/issues/11848:

Resolves #766:

Review & Testing Checklist for Human

  • Verify the stream_slicer=partition_router pattern in create_dynamic_schema_loader matches the established pattern in create_default_stream — both should pass stream_slicer and partition_router with the same value
  • Confirm the regression test actually fails without the fix (revert the production code change and run pytest unit_tests/sources/declarative/parsers/test_model_to_component_factory.py::test_dynamic_schema_loader_with_async_retriever)
  • Validate that the blocked community PR (airbyte#66221 — source-blackbaud-sky-nxt) would be unblocked by this CDK fix

Notes

  • The test covers component creation/instantiation only, not runtime schema fetching behavior. This is sufficient to catch the specific TypeError but does not exercise the full DynamicSchemaLoader + AsyncRetriever data path.
  • Other callers were checked: create_http_components_resolver already correctly passes stream_slicer.
  • This is a non-breaking PATCH-level bug fix — no version bump or metadata changes needed (CDK fix, not connector).

Link to Devin session: https://app.devin.ai/sessions/1035eef80d1f48f6ab01e96589caedb1

In create_dynamic_schema_loader, the retriever was created with only
partition_router but not stream_slicer. This caused AsyncRetriever
creation to fail with 'missing required keyword-only argument:
stream_slicer' since AsyncRetriever requires stream_slicer as a
keyword-only argument while SimpleRetriever accepts partition_router.

The fix mirrors the pattern used in create_default_stream, passing
both stream_slicer and partition_router when creating the retriever.

Resolves #766

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

👋 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@devin/1775066638-fix-dynamic-schema-loader-async-retriever#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 devin/1775066638-fix-dynamic-schema-loader-async-retriever

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
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

PyTest Results (Fast)

3 976 tests  +1   3 965 ✅ +1   7m 33s ⏱️ -1s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 3c50ce4. ± Comparison against base commit 69cd63d.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

PyTest Results (Full)

3 979 tests  +1   3 967 ✅ +1   10m 49s ⏱️ -31s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 3c50ce4. ± Comparison against base commit 69cd63d.

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.

AsyncRetriever cannot be used in DynamicSchemaLoader - parameter name mismatch

0 participants