You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: initialize FixedWindowCallRatePolicy next_reset_ts to one period instead of 10 days
Previously, the initial reset timestamp was set to 10 days from now.
If the API did not return a ratelimit-reset header (e.g. only retry-after),
this value was never updated, causing the rate limiter to sleep for ~10 days
on a 429 response instead of respecting the configured period.
This caused a deadlock where the heartbeat monitor would kill the process
after 1.5 hours of no records emitted.
Now the initial reset timestamp defaults to now + period (e.g. 1 minute),
so the window resets promptly even when the API does not provide reset headers.
Also updated the FixedWindowCallRatePolicy component description to document
the default reset behavior when no ratelimit-reset header is present.
Resolves: airbytehq/oncall#11924
Co-Authored-By: bot_apk <apk@cognition.ai>
Copy file name to clipboardExpand all lines: airbyte_cdk/sources/declarative/models/declarative_component_schema.py
+31-33Lines changed: 31 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,6 @@ class AuthFlowType(Enum):
18
18
oauth1_0="oauth1.0"
19
19
20
20
21
-
classScopesJoinStrategy(Enum):
22
-
space="space"
23
-
comma="comma"
24
-
plus="plus"
25
-
26
-
27
21
classBasicHttpAuthenticator(BaseModel):
28
22
type: Literal["BasicHttpAuthenticator"]
29
23
username: str=Field(
@@ -488,7 +482,7 @@ class Config:
488
482
)
489
483
weight: Optional[Union[int, str]] =Field(
490
484
None,
491
-
description="The weight of a request matching this matcher when acquiring a call from the rate limiter. Different endpoints can consume different amounts from a shared budget by specifying different weights. If not set, each request counts as 1.",
485
+
description="The weight of a request matching this matcher when acquiring a call from the rate limiter. Different endpoints can consume different amounts from a shared budget by specifying different weights. If not set, each request counts as 1.\n",
492
486
title="Weight",
493
487
)
494
488
@@ -828,22 +822,32 @@ class NoPagination(BaseModel):
828
822
type: Literal["NoPagination"]
829
823
830
824
831
-
classState(BaseModel):
825
+
classScope(BaseModel):
832
826
classConfig:
833
827
extra=Extra.allow
834
828
835
-
min: int
836
-
max: int
829
+
scope: str=Field(..., description="The OAuth scope string to request from the provider.")
837
830
838
831
839
-
classOAuthScope(BaseModel):
832
+
classOptionalScope(BaseModel):
840
833
classConfig:
841
834
extra=Extra.allow
842
835
843
-
scope: str=Field(
844
-
...,
845
-
description="The OAuth scope string to request from the provider.",
846
-
)
836
+
scope: str=Field(..., description="The OAuth scope string to request from the provider.")
# NOTE: scopes, optional_scopes, and scopes_join_strategy are processed by the
869
-
# platform OAuth handler (DeclarativeOAuthSpecHandler.kt), not by the CDK runtime.
870
-
# The CDK schema defines the manifest contract; the platform reads these fields
871
-
# during the OAuth consent flow to build the authorization URL.
872
-
scopes: Optional[List[OAuthScope]] =Field(
872
+
scopes: Optional[List[Scope]] =Field(
873
873
None,
874
874
description="List of OAuth scope objects. When present, takes precedence over the `scope` string property.\nThe scope values are joined using the `scopes_join_strategy` (default: space) before being\nsent to the OAuth provider.",
description="Groups of streams that share a common resource and should not be read simultaneously. Each group defines a set of stream references and an action that controls how concurrent reads are managed. Only applies to ConcurrentDeclarativeSource.",
2408
+
description="Groups of streams that share a common resource and should not be read simultaneously. Each group defines a set of stream references and an action that controls how concurrent reads are managed. Only applies to ConcurrentDeclarativeSource.\n",
description="Groups of streams that share a common resource and should not be read simultaneously. Each group defines a set of stream references and an action that controls how concurrent reads are managed. Only applies to ConcurrentDeclarativeSource.",
2448
+
description="Groups of streams that share a common resource and should not be read simultaneously. Each group defines a set of stream references and an action that controls how concurrent reads are managed. Only applies to ConcurrentDeclarativeSource.\n",
@@ -2937,7 +2941,7 @@ class StateDelegatingStream(BaseModel):
2937
2941
)
2938
2942
api_retention_period: Optional[str] =Field(
2939
2943
None,
2940
-
description="The data retention period of the incremental API (ISO8601 duration). If the cursor value is older than this retention period, the connector will automatically fall back to a full refresh to avoid data loss.\nThis is useful for APIs like Stripe Events API which only retain data for 30 days.\n* **PT1H**: 1 hour\n* **P1D**: 1 day\n* **P1W**: 1 week\n* **P1M**: 1 month\n* **P1Y**: 1 year\n* **P30D**: 30 days\n",
2944
+
description="The data retention period of the incremental API (ISO8601 duration). If the cursor value is older than this retention period, the connector will automatically fall back to a full refresh to avoid data loss.\nThis is useful for APIs like Stripe Events API which only retain data for 30 days.\n* **PT1H**: 1 hour\n* **P1D**: 1 day\n* **P1W**: 1 week\n* **P1M**: 1 month\n* **P1Y**: 1 year\n* **P30D**: 30 days\n",
2941
2945
examples=["P30D", "P90D", "P1Y"],
2942
2946
title="API Retention Period",
2943
2947
)
@@ -3111,20 +3115,14 @@ class AsyncRetriever(BaseModel):
0 commit comments