Repository navigation
fix(declarative): fail check fast as transient_error when rate limited - #1239
Draft
devin-ai-integration[bot] wants to merge 2 commits into
Draft
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: Daryna Ishchenko <darina.ishchenko17@gmail.com>
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/1792505866-check-fail-fast-on-rate-limit#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/1792505866-check-fail-fast-on-rate-limitPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
…ate_limit flag Co-Authored-By: Daryna Ishchenko <darina.ishchenko17@gmail.com>
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
A rate-limited
checkon a concurrent declarative source now fails right away withtransient_error. Before, it slept on the rate-limit backoff and then reported a failed connection status, which counts as aconfig_error.Why: source-gmail certification, criteria E-1 and O-5 (https://github.com/airbytehq/airbyte-internal-issues/issues/17916).
checkafter 9 min. A rate-limited check backs off for longer than that: Gmail'sWaitTimeFromResponsewaits ~900 s, and exponential backoff ~636 s.Status.FAILED.DefaultStream.check_availabilitycatches the HttpClient'sAirbyteTracedException(transient_error, "API rate limit exceeded.")and turns it intoStreamAvailability.unavailable.How:
fail_fast_on_rate_limit, off by default. It's threadedHttpRequester→HttpClient.send_request→_send_with_retry→_send→_handle_error_resolution, the same wayexit_on_rate_limitis. When it's set and the response isRATE_LIMITEDwith no other credential to rotate to, the client raisesAirbyteTracedException(failure_type=transient_error)immediately. It doesn't compute a backoff or sleep.DefaultStream.check_availabilityturns onfail_fast_on_rate_limiton the stream's shared retriever's requester while it checks, and restores the old value afterwards.DefaultStream.check_availabilityandCheckStreamre-raise traced exceptions withtransient_errorinstead of turning them into(False, msg).entrypoint.checkalready re-raises non-config traced exceptions after emitting the trace.exit_on_rate_limitandHttpAvailabilityStrategydon't change: they still retry with backoff, just not forever.test_send_handles_retries_when_checking_availabilitypasses unchanged.Behavior change for reviewers: on the concurrent check path, any
transient_errornow propagates as an error, not a FAILED status. That includes a 5xx after retries run out.test_check_empty_static_stream_override...was updated to match.Not yet confirmed against a production check log. The rate-limit cause is inferred from the failure pattern: 2 rate-limited connections, and failures that moved from
API rate limit exceededto the 9-minute timeout when 0.1.21 was released.Link to Devin session: https://app.devin.ai/sessions/4b1e021516004e0ab53c25b7293450a2
Open in Devin Desktop: https://app.devin.ai/desktop/session/4b1e021516004e0ab53c25b7293450a2?variant=devin