-
Notifications
You must be signed in to change notification settings - Fork 955
feat(self_update): add proxy sanity checks #4338
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not bad for the first PR, thanks a lot :)
The existing error messages might indicate that the default toolchain is unset in certain situations, so instead of calling <bin> --version
, maybe call <bin> +<toolchain> --version
?
780a1e1
to
eb1b8c8
Compare
this should be ready for re-review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! I've left a few tiny nits but the overall it looks pretty nice!
cc @ChrisDenton I don't currently think we need to add tests for this particular PR, so modulo the comments I think it's okay to merge it as-is and see how it goes?
Sometimes, proxies can be incorrectly installed for whatever reason. This adds a new check after initial component installation to call all proxies with --version, and to fail if one of them doesn't report success.
eb1b8c8
to
94ed362
Compare
help: this might be a bug in rustup, please open a new issue here:\n\ | ||
help: https://github.com/rust-lang/rustup/issues/new" | ||
)] | ||
InvalidProxyInstall, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd avoid this wording and variant name since technically the proxy install completed without error -- it's just that the installed proxy does not actually work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@djc How about:
InvalidProxyInstall, | |
BrokenProxy, |
... and
"the rustup executable proxies don't seem to work"
Sometimes, proxies can be incorrectly installed for whatever reason. This adds a new check after initial component installation to call all proxies with --version, and to fail if one of them doesn't report success.
Closes #4336 (but there should probably be a followup issue for potentially self-repairing broken proxies?).
There are two test failures in my local testing:this has been resolved (for now...?) by limiting to only core components