-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Automatically retry HTTP requests returning 5xx #4032
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
r? @matklad |
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
Could we test it somehow? |
I wish! Do you have thoughts on how do to do? Unfortunately I don't :( |
Yep, nothing simple comes to mind :( We could roll mini dependency injection to substitute @bors r+ |
📌 Commit 6155653 has been approved by |
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
☀️ Test successful - status-appveyor, status-travis |
There are reports that this didn't work as expected. Maybe we need to have a test. |
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