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

Add support for contexts requiring confirmation #1087

Merged
merged 3 commits into from
Dec 9, 2024
Merged

Conversation

nickmisasi
Copy link
Contributor

Summary

Adds ability to require a confirmation for commands run against a specific context. Contexts can be created or updated with the --confirmation-required flag. When set, commands run against that context will be greeted with

>cloud installation list
Commands against this context (URL: http://localhost:8075) require confirmation. Do you want to proceed? (Y/N):

You can skip the confirmation for a confirmation-required context by simply passing the -y flag.

When the CLI detects that you are hitting a cluster with prod in the URL, and your context is not requiring confirmation, a warning is displayed

>cloud installation list -y --dns test.mattermost.cloud
WARN[2024-12-02T15:40:19-05:00] "Prod" detected in server URL. Consider requiring confirmation on this context. Proceed with caution.

Ticket Link

https://mattermost.atlassian.net/browse/CLD-8612

Release Note

None

@mm-cloud-bot mm-cloud-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Dec 2, 2024
@nickmisasi nickmisasi self-assigned this Dec 2, 2024
@nickmisasi nickmisasi added the 2: Dev Review Requires review by a developer label Dec 2, 2024
Copy link
Contributor

@gabrieljackson gabrieljackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nickmisasi nickmisasi added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a developer labels Dec 9, 2024
@nickmisasi nickmisasi merged commit b1b8f71 into master Dec 9, 2024
5 checks passed
@nickmisasi nickmisasi deleted the CLD-8612 branch December 9, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants