Skip to content
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

Improve UX for commands annotated with updateAPIConfig #434

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

mandopaloooza
Copy link
Contributor

When a command upgrade prepare and upgrade complete (commands with updateAPIConfig annotation) is run before the sdpctl configuration is initialized, it prints the following warning:

It is strongly adviced that you upgrade your appliance to a supported version before executing any sdpctl command. Executing sdpctl commands on an unsupported API version can have serious unforseen consequenses.
Minimum supported API version: 17
Currently using API version: 0

sdpctl reads the key api_version in the config to extract the current API version. This configuration key is only initialized when the user authenticates sdpctl. I changed the orders of the warning printer after there is an attempt to signin.

@thomascellerier
Copy link
Contributor

I'm still not sure this warning makes sense as we always hit it when running in non interactive mode with env variables.
If the current API version is 0 we can auto discover the API version like we did in the old upgrade script, without printing a warning.

@kajes
Copy link
Contributor

kajes commented Jun 26, 2023

I'm fine merging this and we should probably do a release with this fix fairly quickly.

@mandopaloooza mandopaloooza merged commit 1f4b880 into main Jun 26, 2023
2 checks passed
@mandopaloooza mandopaloooza deleted the fix-warning-ux branch June 26, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants