fix: Honor explicit timeout timedelta larger than timeout_max#962
Open
vdusek wants to merge 2 commits into
Open
fix: Honor explicit timeout timedelta larger than timeout_max#962vdusek wants to merge 2 commits into
vdusek wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
July 21, 2026 06:15
vdusek
marked this pull request as draft
July 21, 2026 06:24
Pijukatel
reviewed
Jul 21, 2026
Pijukatel
left a comment
Contributor
There was a problem hiding this comment.
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)
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.
An explicit per-call
timeouttimedelta larger thantimeout_max(default 360 s) was silently clamped totimeout_maxon every attempt, contradicting the documented behavior "Atimedeltaoverrides it for this call". For example,dataset.get_items_as_bytes(timeout=timedelta(minutes=30))ran every attempt with a 360 s timeout, causing repeatedimpit.TimeoutExceptionand failing the call despite the explicit 30-minute request.Root cause:
_compute_timeoutusedmin(resolved * 2**(attempt-1), timeout_max), somin()shrank the resolved base timeout totimeout_maxeven on attempt 1, before any exponential growth. The fix caps growth atmax(timeout_max, resolved)instead, so the base timeout is never shrunk below itself while retry growth stays bounded.✍️ Drafted by Claude Code