Prepare auth logout for global profile and yes flags#4755
Draft
mihaimitrea-db wants to merge 2 commits intomainfrom
Draft
Prepare auth logout for global profile and yes flags#4755mihaimitrea-db wants to merge 2 commits intomainfrom
mihaimitrea-db wants to merge 2 commits intomainfrom
Conversation
Switch `auth logout` from `--force` to `--yes` and stop defining local copies of the shared confirmation and profile flags so the command can inherit the root behavior.
Collaborator
|
Commit: aef434e
18 interesting tests: 9 SKIP, 6 RECOVERED, 3 flaky
Top 20 slowest tests (at least 2 minutes):
|
Align the logout acceptance scripts and expected output with the new confirmation flag so this branch rebases cleanly onto the shared interaction flag changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch
auth logoutfrom--forceto--yesand stop defining local copies of the shared confirmation and profile flags so the command can inherit the root behavior. The--yesflag has been introduced in this PR aiming to standardize the CLI's behaviour: Add global --quiet, --no-input, and --yes flags #4726.Changes
--forceflow with the shared--yesconfirmation behavior inauth logout.--profileand confirmation flags onauth logout, and instead read the values from the shared flags already available on the command tree.--yesbehavior.Why
The
--yesflag was introduced after the logout command was merged, but before it was made publicly visible. Thus, before making it visible this PR aims to align it with the rest of the CLI's behaviour.auth logoutwas handling was defining its own profile, overriding the global variable. This can cause confusion and reduced maintainability, so removing it and defaulting to the root behaviour is a better design decision as it keeps UX aligned with other commands and removes duplicate flag definitions that can drift over time.Tests
go test ./cmd/auth -run TestLogout -count=1