Skip to content
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

Stub out the configuration command and return an error #527

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

adamwg
Copy link
Member

@adamwg adamwg commented May 13, 2024

Description of your changes

The configuration command doesn't work with Upbound Cloud Spaces or Connected Spaces, and the CLI no longer works with Legacy Spaces, so remove the subcommands from up configuration and print a message.

Fixes #493

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

Ran the unit tests, and manually verified that up configuration prints the expected message.

@Upbound-CLA
Copy link

Upbound-CLA commented May 13, 2024

CLA assistant check
All committers have signed the CLA.

cmd/up/main.go Outdated
@@ -105,7 +104,7 @@ type cli struct {
Space space.Cmd `cmd:"" help:"Interact with Spaces."`
Group group.Cmd `cmd:"" help:"Interact with groups inside Spaces."`
ControlPlane controlplane.Cmd `cmd:"" name:"controlplane" aliases:"ctp" help:"Interact with control planes in the current context, both in the cloud and in a local Space."`
Configuration configuration.Cmd `cmd:"" name:"configuration" aliases:"cfg" help:"Interact with configurations."`
Configuration configuration.Cmd `cmd:"" name:"configuration" aliases:"cfg" help:"Interact with configurations (deprecated)."`
Copy link
Member

Choose a reason for hiding this comment

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

I used Deprecated: as a prefix for the help in up ctp.

https://github.com/upbound/up/blob/main/cmd/up/controlplane/controlplane.go#L116-L117

Copy link
Member Author

@adamwg adamwg May 13, 2024

Choose a reason for hiding this comment

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

👍 Updated to match.


Flags upbound.Flags `embed:""`
func (c *Cmd) Run(ctx context.Context, p pterm.TextPrinter) error {
return errors.New("Configurations are not supported in Upbound Spaces")
Copy link
Member

Choose a reason for hiding this comment

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

nit: Just Upbound not Upbound Spaces. I can share a link to you about how we're changing the way we talk about the product, including naming schemes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, makes sense. Feels a bit confusing to just say "not supported in Upbound", since it used to be supported, so I've updated it to no longer supported in Upbound to try and make it clearer why the command still exists. Open to suggestions.

The configuration command doesn't work with Upbound Cloud Spaces or Connected
Spaces, and the CLI no longer works with Legacy Spaces, so remove the
subcommands from `up configuration` and print a message.

Fixes #493

Signed-off-by: Adam Wolfe Gordon <adam.wolfegordon@upbound.io>
@adamwg adamwg merged commit ee9838d into main May 14, 2024
6 checks passed
@adamwg adamwg deleted the awg/cfg-stub branch May 14, 2024 19:45
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.

up cfg has no usefulness in Spaces-based Upbound
3 participants