Skip to content

Pass --revision to helm diff upgrade - #1046

Open
sepich wants to merge 1 commit into
databus23:masterfrom
sepich:issue-1045
Open

Pass --revision to helm diff upgrade#1046
sepich wants to merge 1 commit into
databus23:masterfrom
sepich:issue-1045

Conversation

@sepich

@sepich sepich commented Aug 15, 2026

Copy link
Copy Markdown

fix for #1045
via passing specific --revision to helm diff upgrade

Might be better to change that to to use the newest revision with status: deployed as the baseline rather than the newest revision (gated by new cli arg?)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds explicit revision selection to helm diff upgrade, enabling comparison against a known deployed revision after a failed upgrade.

Changes:

  • Adds and validates the --revision flag.
  • Applies the revision to manifest and hook retrieval.
  • Refactors Helm get arguments and adds unit tests/documentation.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Documents the new flag.
cmd/upgrade.go Adds revision handling and validation.
cmd/upgrade_test.go Tests revision validation.
cmd/helm.go Centralizes revision-aware Helm get arguments.
cmd/helm_test.go Tests generated Helm arguments.
cmd/rollback.go Adopts the revised helper signature.
cmd/revision.go Reuses the unified release helper.
cmd/release.go Adopts the revised helper signature.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cmd/helm.go
// A revision of 0 means no --revision flag is passed, so helm defaults to the
// newest revision of the release regardless of its status.
func helmGetArgs(what, release string, revision int, namespace, kubeContext string) []string {
args := []string{"get", what, release}
@yxxhero

yxxhero commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

@sepich any changes required in helmfile/helmfile?

@yxxhero

yxxhero commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

@sepich please fix ci issue.

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.

3 participants