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

Retry following redirects that return 404 #734

Merged
merged 1 commit into from
Jul 23, 2021
Merged

Retry following redirects that return 404 #734

merged 1 commit into from
Jul 23, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Jul 23, 2021

Closes #727.

@jwodder jwodder added the patch Increment the patch version when merged label Jul 23, 2021
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #734 (6d87780) into master (184cc30) will increase coverage by 0.03%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #734      +/-   ##
==========================================
+ Coverage   84.12%   84.15%   +0.03%     
==========================================
  Files          59       59              
  Lines        5699     5706       +7     
==========================================
+ Hits         4794     4802       +8     
+ Misses        905      904       -1     
Flag Coverage Δ
unittests 84.15% <86.66%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
dandi/dandiarchive.py 85.08% <86.66%> (+0.60%) ⬆️
dandi/dandiapi.py 90.93% <0.00%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 184cc30...6d87780. Read the comment docs.

return r.url
return url
i = 0
while True:
Copy link
Member

Choose a reason for hiding this comment

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

why custom loop, I thought that we have try_multiple using tenacity for such purposes?

Copy link
Member Author

Choose a reason for hiding this comment

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

try_multiple() doesn't support the 0.1, 1, 10 sequence of sleep times that you requested.

Copy link
Member

Choose a reason for hiding this comment

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

it could be any reasonable sequence it supports, I do not care about precise timing, just spread it so it tries for up to 10ish seconds

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel that, in this case, the code is simpler without involving try_multiple().

Copy link
Member

Choose a reason for hiding this comment

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

ok, I will resort to your judgement, lets proceed, thank you!

@yarikoptic
Copy link
Member

note: restarted tests since some were failing for some git reasons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

retry redirect if 400
2 participants