Repository navigation
Resume server-interrupted downloads - #5177
Conversation
dc7a05f to
be81569
Compare
be81569 to
de883d7
Compare
|
@iliana @Skgland Would you mind giving our test build a try and see if rustup can better handle your network connection? You can download the corresponding one for your host at https://github.com/rust-lang/rustup/actions/runs/41038394164 🙏 |
Testing it isn't really trivial -- the dist test fixtures are using |
I totally understand that, and that is why I think some manual testing could be helpful here. 🙏 |
I won't be able to try it before sunday. |
|
With this change on my system I am now able to get toolchains to install, although I did hit: The behavior is now tolerable but still annoying compared to the curl backend due to what seem like sleeps/exponential backoff between retries. curl might be experiencing the same connection resets but retrying without any backoff, I'm not entirely sure. |
@iliana As I explained above, rustup's curl backend doesn't expose this behavior because it's too old to support http2; we are trying to improve http2 support here so there is no parity to be reached WRT the curl backend. Removing http2 support or defaulting to http1.1 when using the reqwest backend is NOT an option here for us. |
|
That makes sense! Sorry I missed that explanation. |
How do you sleeps/exponential backoffs? I don't think we have those? If there is something we could maybe avoid it for this particular failure mode. |
But, maybe there is a way to fall back to HTTP/1 in failure cases? Not sure how easy reqwest makes that sort of thing. |
Here's what I see: https://asciinema.org/a/7eDycB7rXUMn1WLX This may simply be the amount of time it takes to start the connection + request again? |
Yeah, the delay in retrying is a little surprising. Also, I guess we should retry the rustup self-update download, as well? Still, seems like this PR provides a decent improvement, in that your toolchain component downloads can now actually complete. |
|
Appears to be working better. |
|
@Skgland Thanks for the feedback!
As far as I know this logic is not properly applied to self update; will investigate. |
Fixes #5176.
(With help from Claude.)