rust-lang / rustup

The Rust toolchain installer
https://rust-lang.github.io/rustup/
Apache License 2.0
6.18k stars 889 forks source link

Implement checkpointing in the installer, to avoid restarting downloads from zero if they fail #3776

Open apps4uco opened 6 months ago

apps4uco commented 6 months ago

Problem you are trying to solve

On networks that are not 100% reliable, ie mobile broadband in developing countries, at least when using the curl | sh installer, if there is a network problem the installation process starts from zero.

It appears that using the current installer the whole process has to complete for rustup to be installed, at least following the instructions present on the website.

Solution you'd like

Id like to propose that the rustup installer, perform an install of rustup first, so that if the install fails for any reason that rerunning the installer uses the rustup it already installed, so that then rustup can start from the last download that failed.

Notes

To start from zero each time is a waste of your servers bandwidth, and a waste of time and data plan for end users.

Thank you for considering this enhancement.

rami3l commented 6 months ago

@apps4uco Thanks for filing this issue! This is surely a thing to be considered.

rami3l commented 6 months ago

@apps4uco I just checked, it turns out that we actually have download checkpointing in the rustup mode right now, so I assume you're referring to the rustup-init mode?

apps4uco commented 6 months ago

@apps4uco I just checked, it turns out that we actually have download checkpointing in the rustup mode right now, so I assume you're referring to the rustup-init mode?

Sure, I mean the initial install, I must admit I havent looked at the code, but from an outside perspective, it seems as if the rustup installer were to check if rustup had already been installed if not install rustup, then run rustup the problem I mentioned would be solved.

What I experienced is that the whole install process has to succeed, or else it restarts from zero.