-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
bootstrap doesn't retry downloads that fail with a non-HTTP error #110178
Comments
This is a regression from when I moved the downloads from python to rust (about a year ago now I think). |
Mentoring instructions: Add the rust/src/bootstrap/bootstrap.py Line 95 in b80ee39
rust/src/bootstrap/download.rs Line 220 in b80ee39
This doesn't affect the Windows Powershell fallback, since we already retry on any error. |
@rustbot claim |
…kanonur fix: use `--retry-all-errors` instead of `--retry` in curl invocations of bootstrap download closes rust-lang#110178.
This is quite new flag shipped with recent versions of curl, which is not supported on many machines/platforms(including our CI runners). We can consider using |
…kanonur fix: use `--retry-connrefused` in curl invocations of bootstrap download helps with rust-lang#110178.
I'd like to take a look at this. Looking through the PR history, we would like basic retry logic written in Rust versus using a curl flag like |
@rustbot claim |
Thanks!
This shouldn't be needed. For now, retrying on "connection refused" (#110178 (comment)) should be fine. |
I'm a little confused as to why #110245 was closed then. What more is there beyond adding the retry refused connections flag? |
I forgot that our CI runners depend on very old curl versions which doesn't support the flag I suggested. Sorry, you are right. As jyn also said(#110245 (comment)) in that PR, we can handle this in Rust |
@onur-ozkan @jyn514 are we ok with adding the http dependency to facilitate sending requests to the payload URL? I'm very hesitant to add another crate dependency to the core payload. But without it, we would need to manually built a request via the standard library tcp library. Which is a little awkward.
|
What about using curl arguments to read the status code and handle it in rust logic? It might be a bit ugly, but adding a dependency solely for this purpose seems like overkill to me. |
I agree adding a new dep seems extreme. I can try parsing the curl exit code, great idea. |
@rustbot claim |
@rustbot claim |
@jyn514 Hello Is this still relevant? |
please don't ping me about rust-lang/ issues. @onur-ozkan is the current maintainer. |
We didn't change any curl flags since then; it should be still relevant. |
alternative to rust-lang#128459 fixes rust-lang#110178
alternative to rust-lang#128459 fixes rust-lang#110178
@rustbot release-assignment |
alternative to rust-lang#128459 fixes rust-lang#110178
bootstrap: improve error recovery flags to curl alternative to rust-lang#128459 fixes rust-lang#110178 r? `@Kobzol`
bootstrap: improve error recovery flags to curl alternative to rust-lang#128459 fixes rust-lang#110178 r? ``@Kobzol``
bootstrap: improve error recovery flags to curl alternative to rust-lang#128459 fixes rust-lang#110178 r? ```@Kobzol```
bootstrap: improve error recovery flags to curl alternative to rust-lang#128459 fixes rust-lang#110178 r? ````@Kobzol````
Rollup merge of rust-lang#129134 - lolbinarycat:continue-at, r=Kobzol bootstrap: improve error recovery flags to curl alternative to rust-lang#128459 fixes rust-lang#110178 r? ````@Kobzol````
We're passing --retry:
rust/src/bootstrap/download.rs
Line 220 in b80ee39
but by default that only retries 500 errors, not any error: https://everything.curl.dev/usingcurl/downloads/retry#retry-on-any-and-all-errors
Originally posted by @jyn514 in #109875 (comment)
The text was updated successfully, but these errors were encountered: