feat(core): rename pipeline commands#7613
Conversation
|
Idk remember if I asked this already somewhere, but I hope it's ok that I am taking task from "Backlog" section of the roadmap. I would also be happy to take tasks from the "Todo" section. |
That's great, everything in the backlog is something that would be useful, some are more difficult than others. |
There was a problem hiding this comment.
Pull request overview
This PR implements new updatecli pipeline diff and updatecli pipeline apply commands to provide a more consistent command structure, while maintaining backward compatibility by deprecating the existing updatecli diff and updatecli apply commands. This addresses issue #1879 which requested better command naming consistency.
Changes:
- Added new
pipelineparent command withdiffandapplysubcommands following the same pattern as existingmanifestandcomposecommands - Deprecated old
diffandapplycommands with warnings but maintained functionality for backward compatibility - Updated command routing in
cmd/root.goto handle both old and new command paths - Added E2E tests for the new pipeline commands and updated tests for deprecated commands
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/pipeline.go | New parent command for pipeline-related operations |
| cmd/pipeline_diff.go | New implementation of pipeline diff subcommand |
| cmd/pipeline_apply.go | New implementation of pipeline apply subcommand |
| cmd/diff.go | Updated with deprecation warning for backward compatibility |
| cmd/apply.go | Updated with deprecation warning for backward compatibility |
| cmd/root.go | Updated command routing to support both new and deprecated command paths |
| e2e/venom.d/test_pipeline.yaml | New E2E test suite for pipeline commands |
| e2e/venom.d/test_deprecated.yaml | Updated test suite for deprecated commands |
| e2e/scripts/test_pipeline_diff.bash | Test script for new pipeline diff command |
| e2e/scripts/test_pipeline_apply.bash | Test script for new pipeline apply command |
| e2e/scripts/test_deprecated.bash | Updated test script for deprecated commands |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think we could remove the test "e2e/scripts/test_pipeline_apply.bash" and "e2e/scripts/test_diff.bash" The first one because it's very similar to the diff since we can't commit changes The second one because The e2e tests are expensive and slow to run because we also integrate with third api so I would try to avoid too many of them if we can |
|
Looking at this, I realize that |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
|
@josill I hope it's fine to you, I added a few commits to fix the e2e tests. I think the pull request is ready to merge |
|
I also took the opportunity to deprecate |
Yes, no worries. I didn't have time to do the CR yet. |
Fix #1879
Description
This PR implements
updatecli pipeline diffandupdatecli pipeline applyas new subcommands, following the same pattern asmanifestsubcommands. The existingupdatecli diffandupdatecli applycommands remain functional for backward compatibility but are marked as deprecated with warning messages.Changes
New Commands Added:
updatecli pipeline diff- Shows changes (replacesupdatecli diff)updatecli pipeline apply- Checks and applies changes (replacesupdatecli apply)Backward Compatibility:
updatecli diffandupdatecli applystill work but show deprecation warningsTest
To test this pull request, you can run the following commands:
Additional Information
Checklist
Tradeoff
Shared Variables: The new pipeline subcommands reuse the same package-level variables (
applyCommit,applyPush,diffClean, etc.) as the deprecated commands. This means both commands share flag state, which is intentional for consistency but means flags set on one command affect the other. This matches the existing pattern used bycomposecommands which have separate variables.Deprecation Period: The old commands are deprecated but not removed, allowing users time to migrate. The deprecation warnings inform users without breaking existing workflows.
Potential improvement
manifesttopolicyas discussed in the issue thread, which would create a more consistent command structure:updatecli pipeline- for executing pipelinesupdatecli policy- for policy manipulation (currentlymanifest)