-
Notifications
You must be signed in to change notification settings - Fork 893
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
New env RUSTUP_AUTO_SELF_UPDATE
to configure rustup self update
#3821
Comments
@tesuji Hi! I remember the recommended mitigation would be running |
Thanks for fast respond. I don't think running The proposed env can be globally set only once for each CI file. |
@tesuji Hmmm so far the issue seems to be Windows-only. Do you have dozens of different Windows workflows to configure? Don't get me wrong, this is a legit feature request and I don't see a reason why we can't add such a config option. However it definitely cannot be shipped very soon, so I wonder how to solve your immediate problem first without causing too much hassle. |
rustup self update
on Windows CIRUSTUP_AUTO_SELF_UPDATE
to configure rustup self update
on Windows CI
RUSTUP_AUTO_SELF_UPDATE
to configure rustup self update
on Windows CIRUSTUP_AUTO_SELF_UPDATE
to configure rustup self update
Thank you for your sympathy. I agree that the proposed env cannot shipped anytime soon. However, the problem could occur again in the future whenever a new rustup is released. So I think the proposed environment variable could be useful for the future. In the meantime, I'm passing
My CI Windows workflows include:
|
I think it might be interesting to consider if rustup can detect via some environment variable that it is running in well-known CI environments, and disable the self update check in that case? |
Rustup could default to not auto update if the |
I like that. Though I was worry that checking CI env is opt-out, while an new env var is opt-in |
Personally I think disabling auto-update in CI is almost always the right option so it makes sense for it to be the default there. |
@ChrisDenton While I like that proposal... will that interfere with other auto-update settings, and possibly with our own CI? |
I think any auto-update setting should override the CI check. It would just be a default. In rustups's own CI there may need to be a separate test that unsets the "CI" environment variable when running rustup to check that auto-update is enabled in that case. |
I think most of our tests can use a fake environment anyway, so we can make sure it does not include Should we close this issue in favor of #3824? I'm not sure it makes sense to keep both going (I'd probably have updated the title on this one instead of starting a fresh one.) |
Problem you are trying to solve
cc #3709
In the past, every time a new rustup version is released, github actions takes about 2 weeks to update
rustup binary to new versions. In that meantime, the users have to pass
--no-self-update
directly toavoid unsuccessfully updating.
Solution you'd like
I would like rustup to add an environment variable
NO_SELF_UPDATE
that once set, it behaves the same as passing--no-self-update
flag to rustup binary.The
NO_SELF_UPDATE
env will be globally set in CI files for every build jobs. While--no-self-update
flag has to be passed to everyrustup install
invocations.Notes
No response
The text was updated successfully, but these errors were encountered: