Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue retrying downloads on retriable statuses #1558

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Dec 20, 2024

Closes #1556.

path,
attempt,
exc,
)
elif attempt >= attempts_allowed:
Copy link
Member 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
Member Author

Choose a reason for hiding this comment

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

Fixed in bb05a23.

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 12 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 88.53% <0.00%> (+0.14%) ⬆️

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.

@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
25 of 26 checks passed
@yarikoptic yarikoptic deleted the gh-1556 branch December 20, 2024 21:27
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