-
Notifications
You must be signed in to change notification settings - Fork 20
SP-990: Update BYOK CLI; Update go version to 1.24.7 #3177
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
base: main
Are you sure you want to change the base?
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
0462c0d to
4902ab1
Compare
sgagniere
left a comment
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.
Thanks! Here's some comments:
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.
Pull Request Overview
This PR updates the BYOK (Bring Your Own Key) CLI functionality to support new user experience improvements and updates the Go version to 1.24.7 to meet API SDK requirements.
- Adds new
confluent byok updatecommand for modifying display names of self-managed keys - Introduces optional
--display-nameflag for key creation and new filtering options for the list command - Adds validation-related fields (Phase, Since, Message, Region) to key objects and output
Reviewed Changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updates Go version to 1.24.7 and BYOK SDK to v0.0.9 |
| .go-version | Updates Go version specification |
| internal/byok/command_update.go | Implements new update command for modifying key display names |
| internal/byok/command_list.go | Adds new filtering options (region, validation-phase, display-name, key) |
| internal/byok/command_describe.go | Adds validation fields to key description output |
| internal/byok/command_create.go | Adds optional display-name parameter to key creation |
| internal/byok/command.go | Adds update command and new validation output fields |
| pkg/ccloudv2/byok.go | Updates API client to support new filtering and update operations |
| pkg/cmd/flags.go | Adds validation phase flag support |
| test/test-server/*.go | Updates test server with new validation fields and update handler |
| test/fixtures/output/byok/*.golden | Updates expected output with new fields and commands |
| test/byok_test.go | Adds tests for new filtering options and update command |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| cmd.Flags().String("display-name", "", "A human-readable name for the self-managed key.") | ||
| pcmd.AddOutputFlag(cmd) | ||
|
|
||
| cobra.CheckErr(cmd.MarkFlagRequired("display-name")) |
Copilot
AI
Oct 9, 2025
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.
Using cobra.CheckErr for flag validation is not the recommended pattern. Consider handling the error directly: cmd.MarkFlagRequired(\"display-name\") or if err := cmd.MarkFlagRequired(\"display-name\"); err != nil { return err }
| cobra.CheckErr(cmd.MarkFlagRequired("display-name")) | |
| if err := cmd.MarkFlagRequired("display-name"); err != nil { | |
| return nil | |
| } |
| $ confluent byok update cck-12345 --display-name "My production key" | ||
|
|
||
| Flags: | ||
| --display-name string REQUIRED: A human-readable name for the self-managed key. |
Copilot
AI
Oct 9, 2025
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.
The flag description shows 'REQUIRED:' but this is redundant since Cobra automatically indicates required flags. The description should focus on what the flag does rather than its requirement status.
| --display-name string REQUIRED: A human-readable name for the self-managed key. | |
| --display-name string A human-readable name for the self-managed key. |
cqin-confluent
left a comment
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.
Looks good overall, just a couple of questions:
-
Could you elaborate on what scenarios would cause an update display-name operation to fail? I see the test case below, but I’m a bit unclear on what “Non-existent Key” refers to.
"byok update cck-404 --display-name \"Non-existent Key\"" -
Also, could you populate the Test & Review section of the PR description with the outputs from your manual verification of the new operations?
|




Release Notes
New Features
--display-namegives an alias for the self-managed keyconfluent byok updatecommand that allows to alter thedisplay-nameof the self-managed keyPhase,Since,MessageandRegionconfluent byok listfilter options--key,--phase,--region,--display-name.Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Blast Radius
References
Test & Review
https://confluentinc.atlassian.net/wiki/spaces/~61d01fe07aa7ac0070ff9ad0/pages/edit-v2/4822008075