-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Rework HTTP downloader retry logic #865
Conversation
e9198ed
to
e954759
Compare
Codecov Report
@@ Coverage Diff @@
## master #865 +/- ##
==========================================
- Coverage 64.02% 63.97% -0.06%
==========================================
Files 51 51
Lines 6533 6540 +7
==========================================
+ Hits 4183 4184 +1
- Misses 1843 1848 +5
- Partials 507 508 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #865 +/- ##
==========================================
+ Coverage 64.02% 64.07% +0.04%
==========================================
Files 51 51
Lines 6533 6556 +23
==========================================
+ Hits 4183 4201 +18
- Misses 1843 1850 +7
+ Partials 507 505 -2
Continue to review full report at Codecov.
|
Travis issue discussion: https://travis-ci.community/t/travis-network-timeout-issue/4584 |
Tests are still failing which I believe is related to the Travis issue, but while at it, I refactored download retries, and now they can be enabled via config. |
@@ -1,10 +1,12 @@ | |||
all: prepare generate | |||
RUBYBINPATH=$(shell ruby -r rubygems -e 'puts Gem.user_dir')/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with that, make man
runs under regular user account without access to system Ruby lib directories
Apply retries as global, config-level option `downloadRetries` so that it can be applied to any aptly command which downloads objects. Unwrap `errors.Wrap` which is used in downloader. Unwrap `*url.Error` which should be the actual error returned from the HTTP client, catch more cases, be more specific around failures.
03c24ec
to
5e56ac6
Compare
Merging this to unblock other PRs, and this also makes retries work much more reliably. |
Apply retries as global, config-level option
downloadRetries
so thatit can be applied to any aptly command which downloads objects.
Unwrap
errors.Wrap
which is used in downloader.Unwrap
*url.Error
which should be the actual error returned from theHTTP client, catch more cases, be more specific around failures.