-
Notifications
You must be signed in to change notification settings - Fork 10
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
CLI-1067 Deprecate input and exposure of numeric ID in admin user, api-key, acl, service-account commands #929
Conversation
…unt commands Only accept/expose resource IDs.
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 don't think I fully understand the relationship between "users", "user resources" and "service accounts" 😅 so I'll let someone else put the final stamp on this one.
internal/cmd/api-key/command.go
Outdated
@@ -380,11 +377,12 @@ func (c *command) create(cmd *cobra.Command, _ []string) error { | |||
} | |||
|
|||
key := &schedv1.ApiKey{ | |||
Description: description, | |||
AccountId: c.EnvironmentId(), | |||
UserResourceId: saId, |
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.
So a "service account" is a type of "user resource"?
@MuweiHe I'm going to update the branch rules for the |
@mtodzo @brianstrauch can you guys review this one? I think you may have better context than me... |
Made a reminder for myself to re-review this on Monday .. sorry for the delay 😅 |
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.
LGTM up to a couple minor comments. Just a general note that we should carefully try to field test 2.0 with internal users etc. as much as we can before handing this off to customers, in case there is any edge case we did not think of. But I appreciate the testing docs and other reference docs for this PR... I am convinced enough to give the +1 :)
{args: "kafka acl list --cluster lkc-acls-kafka-api", fixture: "kafka/kafka-acls-list.golden"}, | ||
//{args: "kafka acl list --cluster lkc-acls", fixture: "kafka/rp-kafka-acls-list.golden"}, | ||
//{args: "kafka acl list --cluster lkc-acls -o json", fixture: "kafka/rp-kafka-acls-list-json.golden"}, | ||
//{args: "kafka acl list --cluster lkc-acls -o yaml", fixture: "kafka/rp-kafka-acls-list-yaml.golden"}, |
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.
Why are these commented out?
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.
not sure who commented out this... Just checked that those 'rp-kafka-acls-list.golden' files no longer exist.
Checklist
[CRUCIAL] Is the change for CP or CCloud functionalities that are already live in prod?
Did you add/update any commands that accept secrets as args/flags?
What
These commands should only expose/accept resource ID not numeric ID, but might be still using the corresponding numeric ID for api calls.
References
CCloud CLI ID Format Consistency
CLI-1067 Deprecate use of numeric ID in admin user, api-key, acl, service-account commands
Test&Review
CLI-1067 Sample Output