Skip to content

Comments

Continue retrying downloads on retriable statuses#1558

Merged
yarikoptic merged 2 commits intomasterfrom
gh-1556
Dec 20, 2024
Merged

Continue retrying downloads on retriable statuses#1558
yarikoptic merged 2 commits intomasterfrom
gh-1556

Conversation

@jwodder
Copy link
Contributor

@jwodder jwodder commented Dec 20, 2024

Closes #1556.

attempt,
exc,
)
elif attempt >= attempts_allowed:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yarikoptic Question: Shouldn't this check be at the top of the function? Otherwise, if we keep hitting, say, 500 responses, it'll keep retrying beyong the maximum number of attempts.

Copy link
Member

Choose a reason for hiding this comment

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

indeed. But after potential increment of attempts_allowed in the "aggressive" mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in bb05a23.

@codecov
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.53%. Comparing base (29009f6) to head (bb05a23).
Report is 92 commits behind head on master.

Files with missing lines Patch % Lines
dandi/download.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1558      +/-   ##
==========================================
+ Coverage   88.38%   88.53%   +0.14%     
==========================================
  Files          78       78              
  Lines       10736    10735       -1     
==========================================
+ Hits         9489     9504      +15     
+ Misses       1247     1231      -16     
Flag Coverage Δ
unittests 87.75% <0.00%> (-0.63%) ⬇️

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.

@jwodder jwodder added the patch Increment the patch version when merged label Dec 20, 2024
@jwodder jwodder marked this pull request as ready for review December 20, 2024 18:02
@yarikoptic
Copy link
Member

I think this is legit, I want to propose further changes. Will follow up with a PR "shortly".

@yarikoptic yarikoptic merged commit 669b182 into master Dec 20, 2024
24 of 25 checks passed
@yarikoptic yarikoptic deleted the gh-1556 branch December 20, 2024 21:27
@github-actions
Copy link

🚀 PR was released in 0.66.4 🚀

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

Labels

cmd-download patch Increment the patch version when merged released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

We are not retrying (long enough?) when encountering 500 and 503

2 participants