airbytehq / airbytehq/airbyte-python-cdk

AsyncRetriever cannot be used in DynamicSchemaLoader - parameter name mismatch

オープン
#766 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
airbyte-python-cdk airbyte-python-cdk/low-code area/connector-builder bug community
主要言語
Python
スター
26
フォーク
53
平均マージ
2日 6時間
マージ済み PR(30日)
10

説明

## Description
AsyncRetriever fails when used inside DynamicSchemaLoader for dynamic schema generation, throwing:
TypeError: ModelToComponentFactory.create_async_retriever() missing 1 required keyword-only argument: 'stream_slicer'

## Root Cause
In `airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py`:

- **Line 2556**: `create_dynamic_schema_loader` passes `partition_router=...` when creating the retriever
- **Line 837**: `_create_component_from_model` passes kwargs through unchanged
- **Line 3465**: `create_async_retriever` expects `stream_slicer` as a required parameter

The parameter names don't match - `partition_router` is passed but `stream_slicer` is expected.

## Steps to Reproduce
Use AsyncRetriever in a DynamicSchemaLoader in a declarative YAML connector:
```yaml
schema_loader:
type: DynamicSchemaLoader
retriever:
type: AsyncRetriever
# ... AsyncRetriever config

Expected Behavior

AsyncRetriever should work in DynamicSchemaLoader just like SimpleRetriever does.

Suggested Fix

Either:
- Change line 2556 to pass stream_slicer=... instead of partition_router=...
- Or change line 3465 to accept partition_router instead of stream_slicer

Environment

- airbyte-cdk version: [latest ... cloud 7.0.4 ]
- Connector type: Declarative YAML (low-code)

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11848

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。