Skip to content

Conversation

@erikgb
Copy link
Member

@erikgb erikgb commented Dec 29, 2025

Helm v4 contains quite a few breaking changes. In particular, releases are now immutable, forcing me to rewrite the "safe" uninstall introduced in #13.

I am not sure how to test these changes beyond what's covered by the integration tests run in CI. Any help in testing and verifying that this works as expected would be appreciated.

@cert-manager-prow cert-manager-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Dec 29, 2025
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jakexks for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 29, 2025
@erikgb erikgb force-pushed the helm-v4 branch 2 times, most recently from 8882093 to 8bb417b Compare December 29, 2025 19:37
@erikgb erikgb requested a review from Copilot December 29, 2025 19:47
@erikgb erikgb changed the title WIP: Upgrade to Helm v4 Upgrade to Helm v4 Dec 29, 2025
@cert-manager-prow cert-manager-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 29, 2025
Copy link

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 upgrades cmctl from Helm v3 to Helm v4, addressing breaking changes introduced in the new version. The most significant change is that Helm v4 releases are now immutable, requiring a complete rewrite of the "safe uninstall" functionality that was introduced in PR #13.

Key changes:

  • Updates Helm dependency from v3.19.4 to v4.0.4
  • Rewrites CRD annotation logic to modify CRDs directly via Kubernetes API instead of modifying the Helm release manifest
  • Migrates to Helm v4's new Accessor API pattern for accessing release and chart metadata
  • Replaces deprecated Wait/Atomic/DryRun flags with new WaitStrategy, RollbackOnFailure, and DryRunStrategy patterns

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod Updates Helm dependency to v4.0.4 and adds new transitive dependencies
go.sum Updates checksums for Helm v4 and its new dependencies
pkg/uninstall/uninstall.go Rewrites addCRDAnnotations to modify CRDs directly using dynamic client instead of modifying release manifest; migrates to WaitStrategy and Accessor APIs
pkg/install/install.go Migrates to Helm v4 chart and release Accessor APIs; replaces DryRun/Wait/Atomic flags with new DryRunStrategy/WaitStrategy/RollbackOnFailure patterns
pkg/install/util.go Updates Helm import paths to v4
pkg/install/helm/settings.go Removes logger callback from ActionConfiguration.Init (no longer supported in v4)
pkg/install/helm/resource.go Updates Helm import path to v4
pkg/install/helm/applycrd.go Migrates to WaitStrategy pattern using GetWaiter method
test/integration/ctl_uninstall_test.go Updates expected test output to match new uninstall behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

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 8 out of 9 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

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 8 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

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 8 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Erik Godding Boye <[email protected]>
@erikgb
Copy link
Member Author

erikgb commented Dec 29, 2025

/cc @wallrj @inteon

@cert-manager-prow cert-manager-prow bot requested a review from inteon December 29, 2025 20:56
@cert-manager-prow cert-manager-prow bot requested a review from wallrj December 29, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant