-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add prompt to proceed if http proxy is set and https proxy unset #2186
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: main
Are you sure you want to change the base?
Conversation
This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID. Online Installer:
Airgap Installer (may take a few minutes before the airgap bundle is built):
Happy debugging! |
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'm approving the change but I would wait for feedback from @ajp-io on the ux and copy
@@ -99,6 +101,20 @@ func getProxySpec(cmd *cobra.Command) (*ecv1beta1.ProxySpec, error) { | |||
} | |||
} | |||
|
|||
// Check if user only provided HTTP proxy but not HTTPS proxy | |||
if httpProxy != "" && httpsProxy == "" { | |||
message := "Typically if `http_proxy` is set, `https_proxy` should be set too. Installation failures are likely otherwise. Do you want to continue anyway?" |
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.
message := "Typically if `http_proxy` is set, `https_proxy` should be set too. Installation failures are likely otherwise. Do you want to continue anyway?" | |
message := "Typically --https-proxy should be set if --http-proxy is set. Installation failures are likely otherwise. Do you want to continue anyway?" |
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.
looking at your loom, this prints out before the message about a required flag (--license) missing. generally i think errors due to missing flags should be shown first since this is an informational warning that someone could ignore. so i would prefer for this check to occur after the required flags are looked at.
What this PR does / why we need it:
Installation fails if
http_proxy
is configured buthttps_proxy
is not set.This PR adds the following confirmation prompt before proceeding with an installation:
Which issue(s) this PR fixes:
https://app.shortcut.com/replicated/story/121629/prompt-if-http-proxy-is-set-but-not-https-proxy
Does this PR require a test?
Unit tests have been added to verify:
http_proxy
set withouthttps_proxy
and user confirms (inputs y) proceeding with installationhttp_proxy
set withouthttps_proxy
and user declines (inputs n) proceeding with installationDoes this PR require a release note?
Does this PR require documentation?
NONE