X Tutup
Skip to content

feat(core): rename pipeline commands#7613

Merged
olblak merged 10 commits intoupdatecli:mainfrom
josill:feat/pipeline-commands
Jan 29, 2026
Merged

feat(core): rename pipeline commands#7613
olblak merged 10 commits intoupdatecli:mainfrom
josill:feat/pipeline-commands

Conversation

@josill
Copy link
Contributor

@josill josill commented Jan 26, 2026

Fix #1879

Description

This PR implements updatecli pipeline diff and updatecli pipeline apply as new subcommands, following the same pattern as manifest subcommands. The existing updatecli diff and updatecli apply commands remain functional for backward compatibility but are marked as deprecated with warning messages.

Changes

  1. New Commands Added:

    • updatecli pipeline diff - Shows changes (replaces updatecli diff)
    • updatecli pipeline apply - Checks and applies changes (replaces updatecli apply)
  2. Backward Compatibility:

    • updatecli diff and updatecli apply still work but show deprecation warnings
    • Both old and new command paths route to the same execution logic
    • No breaking changes for existing workflows

Test

To test this pull request, you can run the following commands:

# Build the binary
make build

# Test new commands exist and work
./dist/updatecli_$(go env GOHOSTOS)_$(go env GOHOSTARCH)/updatecli pipeline --help
./dist/updatecli_$(go env GOHOSTOS)_$(go env GOHOSTARCH)/updatecli pipeline diff --help
./dist/updatecli_$(go env GOHOSTOS)_$(go env GOHOSTARCH)/updatecli pipeline apply --help

# Test deprecated commands show warnings but still work
./dist/updatecli_$(go env GOHOSTOS)_$(go env GOHOSTARCH)/updatecli diff --help | grep -i deprecated
./dist/updatecli_$(go env GOHOSTOS)_$(go env GOHOSTARCH)/updatecli apply --help | grep -i deprecated

# Run unit tests
go test ./cmd/...

Additional Information

Checklist

  • Code follows existing patterns and conventions
  • Backward compatibility maintained
  • Deprecation warnings added
  • E2E tests added for new commands
  • E2E tests updated for deprecated commands
  • Documentation updated (should be done in separate PR to website repository)

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 by compose commands 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

  • In the future, consider renaming manifest to policy as discussed in the issue thread, which would create a more consistent command structure:
    • updatecli pipeline - for executing pipelines
    • updatecli policy - for policy manipulation (currently manifest)

@josill josill marked this pull request as ready for review January 26, 2026 15:52
@josill
Copy link
Contributor Author

josill commented Jan 26, 2026

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.

@olblak olblak requested a review from Copilot January 26, 2026 19:31
@olblak olblak added ux core All things related to Updatecli core engine labels Jan 26, 2026
@olblak
Copy link
Member

olblak commented Jan 26, 2026

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.
We try to never introduce breaking changes, but instead we use deprecation.

@olblak olblak enabled auto-merge (squash) January 26, 2026 19:34
Copy link
Contributor

Copilot AI left a 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 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 pipeline parent command with diff and apply subcommands following the same pattern as existing manifest and compose commands
  • Deprecated old diff and apply commands with warnings but maintained functionality for backward compatibility
  • Updated command routing in cmd/root.go to 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.

@olblak olblak changed the title Feat/pipeline commands feat: rename pipeline commands Jan 26, 2026
@olblak
Copy link
Member

olblak commented Jan 27, 2026

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 updatecli diff and updatecli pipeline diff should be similar.

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

@olblak
Copy link
Member

olblak commented Jan 27, 2026

Looking at this, I realize that updatecli prepare should also be deprecated to updatecli pipeline prepare

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

olblak and others added 3 commits January 28, 2026 22:08
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak
Copy link
Member

olblak commented Jan 29, 2026

@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

@olblak
Copy link
Member

olblak commented Jan 29, 2026

I also took the opportunity to deprecate updatecli prepare in favor of updatecli pipeline prepare

@josill
Copy link
Contributor Author

josill commented Jan 29, 2026

@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

Yes, no worries. I didn't have time to do the CR yet.

@olblak olblak merged commit f74e709 into updatecli:main Jan 29, 2026
5 checks passed
@olblak olblak added the enhancement New feature or request label Feb 5, 2026
@olblak olblak changed the title feat: rename pipeline commands feat(core): rename pipeline commands Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core All things related to Updatecli core engine enhancement New feature or request ux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Renaming Updatecli commands

3 participants

X Tutup