-
Notifications
You must be signed in to change notification settings - Fork 600
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
rpk profile
changes
#17038
rpk profile
changes
#17038
Conversation
SMALL * Adds "rpk" to the early-check-exit error message; if a person has some rpk command in their bashrc, it is useful to know why rpk startup is failing LARGE * Reworks logins and profiles to be more explicit about the organizations being used
src/go/rpk/pkg/cli/cloud/login.go
Outdated
|
||
// When you have no profile, or you have one that is not selected. | ||
if p == nil || len(y.Profiles) == 0 { | ||
fmt.Println(`To create an rpk profile to talk to an existing cloud cluster, use 'rpk cloud cluster use'. |
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.
See the changes we discussed in person (change to the language we designed).
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.
This now only prints if you use --no-profile -- new messaging is better, and I think this is worth keeping for the --no-profile flag
src/go/rpk/pkg/cli/cloud/login.go
Outdated
// having a different org's auth. | ||
if p != nil && clearedProfile { | ||
priorAuth := p.ActualAuth() | ||
fmt.Printf(`rpk swapped away from your prior profile %q which authenticated with organization %q (%s). |
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.
Reduce verbosity, more directive language:
Login token change detected
Select cloud cluster to talk to:
rpk cloud cluster use
rpk will talk to a localhost:9092 cluster otherwise
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.
Actually this one, I'd like to keep the current messaging (or the details of it) -- a lot of the confusion people were running into was what happened when they switched orgs, and I want to make sure it's really clear to end users that their auth is now talking to a different org.
Kind is now no longer computed, making some things more robust and easier to reason about.
The virtual auth may contain client IDs or secrets that are not mirrored in the actual auth.
If we have profile A from auth SSO, we cannot keep profile A if we subsequently log in with client credentials. Even though the organizations are the same, the auth is different, and we need a new profile tied to the new auth.
This also removes `omitempty` from a bunch of fields, which should make it clearer in `rpk profile edit` what potential fields exist.
~/.config only exists on linux
Closes #12802, except for the documented yaml -- this can be a separate issue. |
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.
Just one final comment
This makes the yaml look a bit nicer. Also updates the yaml sha, sticking with v3 since v3 is introduced in this PR.
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.
🚀
Merging -- Snyk is unrelated |
/backport v23.3.x |
Failed to create a backport PR to v23.3.x branch. I tried:
|
(cherry picked from commit 3462616)
(cherry picked from commit 3462616)
rpk cloud auth
commands, which were confusing and are now unnecessaryBackports Required
Release Notes
Improvements
rpk profile
has been reworked in an attempt to be simpler; see PRrpk profile
changes #17038 for more detail