Repository navigation
fix(cdk): name the stream in the rate-limit-exhausted error message - #1242
Draft
devin-ai-integration[bot] wants to merge 1 commit into
Draft
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: bot_apk <apk@cognition.ai>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This CDK VersionYou 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/1792528193-rate-limit-error-message-stream-name#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/1792528193-rate-limit-error-message-stream-namePR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves https://github.com/airbytehq/oncall/issues/13799:
Close on merge: no — treated as customer-filed (the issue references a specific customer connection/job); support confirms before closing.
When
HttpClient._send_with_retryexhausts retries on HTTP 429, the user-facing message was just"API rate limit exceeded."with no context. It now names the requester/stream:internal_message,failure_type=transient_errorandstream_descriptorare unchanged. Follows the existing in-file pattern (f"Stream '{self._name}' page rejected...") and the error-message guidelines (deterministic per stream, no remediation hint for transient errors, <200 chars).Note on async retrievers:
AsyncRetrieversub-requesters are named by the factory as e.g."job extract_url - <stream>", so for the reported case (source-amazon-seller-partner,download_target_requester) the message readsAPI rate limit exceeded for stream 'job extract_url - GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE' after all retries were exhausted.— this names both the real stream and the job phase that was rate limited, and matches the stream descriptor already emitted. Stripping the prefix to a bare stream name would require plumbing a separate stream name throughHttpRequester/HttpClient; left out to keep this change minimal.Related: open PR #949 also touches rate-limit messaging (default 429 mapping + a
RateLimitBackoffExceptionbranch suggesting fewer workers). This PR only changes the existing 429-exhaustedmessagestring and doesn't conflict semantically; whichever lands second should keep the stream name in the message.Rollout: manifest-only connectors (incl. source-amazon-seller-partner) pick this up only after a
source-declarative-manifestbase image bump — not done here. The connector-side missing 429 handler is tracked separately in https://github.com/airbytehq/oncall/issues/13798.Test Coverage
match="API rate limit exceeded."asserts intest_http.py.test_rate_limit_exhaustion_includes_stream_context(test_http.py): asserts exact message,transient_error, and stream descriptor.test_rate_limit_exhaustion_message_includes_stream_name(test_http_client.py):HttpClient(name="job extract_url - my_stream")exhausting 429 retries.assert 'API rate limit exceeded.' == ...) and pass with the fix;unit_tests/sources/streams/http/: 535 passed. Ruff lint/format and MyPy clean.Declarative-First Evaluation
Not applicable — this is a CDK core change, not a connector manifest change.
Breaking change
Not breaking: only the human-readable
messagetext changes; no schema, spec, state, or failure-type changes. Version is managed by the CDK release process (no manual bump).Link to Devin session: https://app.devin.ai/sessions/08fec716181a4970a327e02d3623902c
Open in Devin Desktop: https://app.devin.ai/desktop/session/08fec716181a4970a327e02d3623902c?variant=devin