Skip to content

test: raise call_with_exp_backoff retry budget for flaky shared RQ tests#876

Merged
vdusek merged 1 commit intomasterfrom
test/flaky-request-ordering-mixed-operations
Apr 21, 2026
Merged

test: raise call_with_exp_backoff retry budget for flaky shared RQ tests#876
vdusek merged 1 commit intomasterfrom
test/flaky-request-ordering-mixed-operations

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Apr 20, 2026

Description

test_request_ordering_with_mixed_operations[shared] failed on CI because fetch_next_request returned None after all retries. The test already wraps the call in call_with_exp_backoff, but the helper's default max_retries=3 only allows 1+2+4 = 7s of backoff — shared RQ propagation delay (see #808) occasionally exceeds that.

Raising the default to max_retries=5 extends the worst-case wait to 1+2+4+8+16 = 31s. No cost in the happy path (returns on the first successful call), and the change benefits all 37 call sites of the helper.

Failed CI run: https://github.com/apify/apify-sdk-python/actions/runs/24673724360/job/72151584275

🤖 Generated with Claude Code

…tests

Shared request queue propagation (issue #808) occasionally exceeds the
current 7s budget (1+2+4), causing flakes like `test_request_ordering_with_mixed_operations[shared]`.
Bumping `max_retries` from 3 to 5 extends the worst-case wait to ~31s
while adding no cost in the happy path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Apr 20, 2026
@vdusek vdusek self-assigned this Apr 20, 2026
@github-actions github-actions Bot added this to the 139th sprint - Tooling team milestone Apr 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.64%. Comparing base (737b0dd) to head (d117f3a).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #876      +/-   ##
==========================================
+ Coverage   86.57%   86.64%   +0.06%     
==========================================
  Files          48       48              
  Lines        2920     2920              
==========================================
+ Hits         2528     2530       +2     
+ Misses        392      390       -2     
Flag Coverage Δ
e2e 37.87% <ø> (ø)
integration 59.28% <ø> (ø)
unit 75.37% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek requested a review from Pijukatel April 21, 2026 07:04
@vdusek vdusek merged commit ed6eb80 into master Apr 21, 2026
31 checks passed
@vdusek vdusek deleted the test/flaky-request-ordering-mixed-operations branch April 21, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants