Skip to content

Conversation

@lizrabuya
Copy link
Contributor

@lizrabuya lizrabuya commented Dec 16, 2025

Description

Migrate configure and configure add commands to Kong.

Kong does not handle the pattern well for an optional subcommand like bk configure add. The approach was to create a default command that is hidden and takes the bk configure.

Changes

  • Moved /pkg/cmd/configure/* to /cmd/configure/*
  • Removed input prompt for organisation slug and refers to the --org flag now. This will error if the flag is not provided.

Testing

  • Tests have run locally (with go test ./...)
  • Code is formatted (with go fmt ./...)

Disclosures / Credits

Consulted Claude on the best approach to implement the optional subcommand in Kong framework.

@lizrabuya lizrabuya marked this pull request as ready for review December 19, 2025 00:58
@lizrabuya lizrabuya requested a review from a team as a code owner December 19, 2025 00:58
Comment on lines -44 to -51
// Get organization slug
org, err := promptForInput("Organization slug: ", false)
if err != nil {
return err
}
if org == "" {
return errors.New("organization slug cannot be empty")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We no longer ask for the org, so bk configure add will fail with no organisation supplied or something, did this get tested?

Copy link
Contributor Author

@lizrabuya lizrabuya Dec 19, 2025

Choose a reason for hiding this comment

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

@mcncl , yes it got tested. I have removed the prompts and it should be provided as a flag now --org. It will error if the flag is not provided. I've updated the PR description. Maybe I should remove it as a flag and change it to an argument. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

@lizrabuya it's fine if we want to go via --org/organization, however the --help output says to run this which is incorrect;

bk configure add

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should note in the help output examples that we need those?

@lizrabuya lizrabuya marked this pull request as draft December 19, 2025 06:45
@lizrabuya
Copy link
Contributor Author

Need more changes on the configure and configure add command with Kong

@lizrabuya lizrabuya marked this pull request as ready for review January 5, 2026 01:21
@JoeColeman95 JoeColeman95 merged commit 6bd3580 into main Jan 5, 2026
1 check passed
@JoeColeman95 JoeColeman95 deleted the SUP-5775-configure-cmd-to-kong branch January 5, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants