Automatically retry HTTP requests returning 5xx#4032
Merged
bors merged 1 commit intorust-lang:masterfrom May 11, 2017
Merged
Conversation
This commit implements auto-retry for downloading crates from crates.io whenever a 5xx response is returned. This should help assist with automatic retries whenever Cargo attempts to download directly from S3 but S3 returns a 500 error, which is defined as "please retry again". This logic may be a little eager to retry *all* 500 errors, but there's a maximum cap on all retries regardless, so hopefully it doesn't result in too many problems. Closes rust-lang#3962
Member
Author
|
r? @matklad |
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
|
Could we test it somehow? |
Member
Author
|
I wish! Do you have thoughts on how do to do? Unfortunately I don't :( |
Contributor
|
Yep, nothing simple comes to mind :( We could roll mini dependency injection to substitute @bors r+ |
Contributor
|
📌 Commit 6155653 has been approved by |
Contributor
bors
added a commit
that referenced
this pull request
May 11, 2017
Automatically retry HTTP requests returning 5xx This commit implements auto-retry for downloading crates from crates.io whenever a 5xx response is returned. This should help assist with automatic retries whenever Cargo attempts to download directly from S3 but S3 returns a 500 error, which is defined as "please retry again". This logic may be a little eager to retry *all* 500 errors, but there's a maximum cap on all retries regardless, so hopefully it doesn't result in too many problems. Closes #3962
Contributor
|
☀️ Test successful - status-appveyor, status-travis |
Contributor
|
There are reports that this didn't work as expected. Maybe we need to have a test. |
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.
This commit implements auto-retry for downloading crates from crates.io whenever
a 5xx response is returned. This should help assist with automatic retries
whenever Cargo attempts to download directly from S3 but S3 returns a 500 error,
which is defined as "please retry again".
This logic may be a little eager to retry all 500 errors, but there's a
maximum cap on all retries regardless, so hopefully it doesn't result in too
many problems.
Closes #3962