fix: require --file for canvases update without positional id#4401
Closed
shiroyasha wants to merge 1 commit into
Closed
fix: require --file for canvases update without positional id#4401shiroyasha wants to merge 1 commit into
shiroyasha wants to merge 1 commit into
Conversation
Align superplane canvases update with YAML-only targeting per #4231: - Cobra use/args and MarkFlagRequired for --file - Remove active-canvas / name-or-id path; canvas id comes from metadata.id - Update change-requests hint to match new invocation Co-authored-by: Igor Šarčević <igisar@gmail.com>
|
👋 Commands for maintainers:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements superplanehq/superplane#4231:
superplane canvases updatenow only accepts canvas YAML via--file/-f(no[name-or-id]positional). The canvas to update is identified solely bymetadata.idin the YAML, matching the issue and lucaspin’s comment that the command should not accept<name-or-id>and should only use the YAML.Changes
pkg/cli/commands/canvases/root.go:Use: "update",Args: cobra.NoArgs,MarkFlagRequired("file").pkg/cli/commands/canvases/update.go: always load from file; removedloadCanvasFromExistingand unuseddescribeCanvasByID.pkg/cli/commands/canvases/change_requests.go: error hint updated tosuperplane canvases update -f <path-to-yaml> --draft ....pkg/cli/commands/canvases/update_test.go:TestUpdateRequiresFilefor missing/empty--file.Review / comments
--file.Testing
--filerequirement.go test ./pkg/cli/commands/canvases/...was not runnable in this agent environment (generatedopenapi_clientpackage absent from the checkout); CI should run the full suite.