Skip to content

Commit 404f68b

Browse files
fix: propagate api_budget to parent streams in substream partition routers
When parent streams are created for substream partition routers, a new ModelToComponentFactory instance is created without the global _api_budget being propagated. This causes parent streams to ignore rate limiting configuration, leading to 403 errors when API rate limits are exceeded. This fix ensures that the _api_budget is propagated to the new factory instance so parent streams respect the same rate limiting configuration as child streams. Fixes airbytehq/oncall#9874 Co-Authored-By: unknown <>
1 parent 6504148 commit 404f68b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3888,6 +3888,8 @@ def create_parent_stream_config_with_substream_wrapper(
38883888
),
38893889
),
38903890
)
3891+
3892+
substream_factory._api_budget = self._api_budget
38913893

38923894
return substream_factory.create_parent_stream_config(
38933895
model=model, config=config, stream_name=stream_name, **kwargs

0 commit comments

Comments
 (0)