Skip to content

fix(declarative): fail check fast as transient_error when rate limited - #1239

Draft
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1792505866-check-fail-fast-on-rate-limit
Draft

devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1792505866-check-fail-fast-on-rate-limit

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A rate-limited check on a concurrent declarative source now fails right away with transient_error. Before, it slept on the rate-limit backoff and then reported a failed connection status, which counts as a config_error.

Why: source-gmail certification, criteria E-1 and O-5 (https://github.com/airbytehq/airbyte-internal-issues/issues/17916).

  • Over the last 7 days, 120 Cloud check failures were "Failed to find output files from connector within timeout of 9 minute(s)". The platform sidecar kills check after 9 min. A rate-limited check backs off for longer than that: Gmail's WaitTimeFromResponse waits ~900 s, and exponential backoff ~636 s.
  • If the check outlives the backoff, the CDK still reports it as Status.FAILED. DefaultStream.check_availability catches the HttpClient's AirbyteTracedException(transient_error, "API rate limit exceeded.") and turns it into StreamAvailability.unavailable.

How:

  • New flag fail_fast_on_rate_limit, off by default. It's threaded HttpRequester → HttpClient.send_request → _send_with_retry → _send → _handle_error_resolution, the same way exit_on_rate_limit is. When it's set and the response is RATE_LIMITED with no other credential to rotate to, the client raises AirbyteTracedException(failure_type=transient_error) immediately. It doesn't compute a backoff or sleep.
  • DefaultStream.check_availability turns on fail_fast_on_rate_limit on the stream's shared retriever's requester while it checks, and restores the old value afterwards.
  • DefaultStream.check_availability and CheckStream re-raise traced exceptions with transient_error instead of turning them into (False, msg). entrypoint.check already re-raises non-config traced exceptions after emitting the trace.
  • Legacy exit_on_rate_limit and HttpAvailabilityStrategy don't change: they still retry with backoff, just not forever. test_send_handles_retries_when_checking_availability passes unchanged.

Behavior change for reviewers: on the concurrent check path, any transient_error now 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 exceeded to 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

Co-Authored-By: Daryna Ishchenko <darina.ishchenko17@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This CDK Version

You 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-limit

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /prerelease - Triggers a prerelease publish with default arguments
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PyTest Results (Fast)

5 848 tests  +10   5 817 ✅ +10   12m 18s ⏱️ + 4m 9s
    1 suites ± 0      31 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit a025e87. ± Comparison against base commit 8b721cd.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PyTest Results (Full)

5 851 tests  +10   5 820 ✅ +10   17m 10s ⏱️ +29s
    1 suites ± 0      31 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit a025e87. ± Comparison against base commit 8b721cd.

♻️ This comment has been updated with latest results.

…ate_limit flag

Co-Authored-By: Daryna Ishchenko <darina.ishchenko17@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants