Skip to content

fix: Honor explicit timeout timedelta larger than timeout_max#962

Open
vdusek wants to merge 2 commits into
masterfrom
worktree-fix-b4
Open

fix: Honor explicit timeout timedelta larger than timeout_max#962
vdusek wants to merge 2 commits into
masterfrom
worktree-fix-b4

Conversation

@vdusek

@vdusek vdusek commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

An explicit per-call timeout timedelta larger than timeout_max (default 360 s) was silently clamped to timeout_max on every attempt, contradicting the documented behavior "A timedelta overrides it for this call". For example, dataset.get_items_as_bytes(timeout=timedelta(minutes=30)) ran every attempt with a 360 s timeout, causing repeated impit.TimeoutException and failing the call despite the explicit 30-minute request.

Root cause: _compute_timeout used min(resolved * 2**(attempt-1), timeout_max), so min() shrank the resolved base timeout to timeout_max even on attempt 1, before any exponential growth. The fix caps growth at max(timeout_max, resolved) instead, so the base timeout is never shrunk below itself while retry growth stays bounded.

✍️ Drafted by Claude Code

@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 Jul 20, 2026
@vdusek vdusek self-assigned this Jul 20, 2026
@github-actions github-actions Bot added this to the 145th sprint - Tooling team milestone Jul 20, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jul 20, 2026
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.66%. Comparing base (c1bffc6) to head (2ecbeea).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #962      +/-   ##
==========================================
+ Coverage   94.64%   94.66%   +0.01%     
==========================================
  Files          58       58              
  Lines        5263     5263              
==========================================
+ Hits         4981     4982       +1     
+ Misses        282      281       -1     
Flag Coverage Δ
integration 92.60% <100.00%> (+0.30%) ⬆️
unit 83.94% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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 marked this pull request as ready for review July 21, 2026 06:15
@vdusek
vdusek requested review from Pijukatel and removed request for Pijukatel July 21, 2026 06:15
@vdusek
vdusek marked this pull request as draft July 21, 2026 06:24
@vdusek
vdusek requested a review from Pijukatel July 21, 2026 06:32
@vdusek
vdusek marked this pull request as ready for review July 21, 2026 06:32
@vdusek
vdusek requested a review from szaganek as a code owner July 21, 2026 06:32

@Pijukatel Pijukatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please verify in the API code that a timeout larger than 360 s has any meaning?

If there is some hard-coded or implementation limit on the API side, it makes no sense to lift the limit in the client.

(But a warning might be good in those cases)

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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants