Skip to content

Migrate from helm/v3 to helm/v4#620

Merged
komish merged 1 commit into
redhat-certification:mainfrom
komish:helmv4-migration
Jun 17, 2026
Merged

Migrate from helm/v3 to helm/v4#620
komish merged 1 commit into
redhat-certification:mainfrom
komish:helmv4-migration

Conversation

@komish

@komish komish commented Jun 11, 2026

Copy link
Copy Markdown
Member

This PR migrates to the Helm/v4 APIs (from Helm/v3). Where possible, the new library was swapped in while attempting to preserve as much of the original functionality as possible. I don't see any major breaking changes impacting Chart Verifier as a result of the migration.

Notes for maintainers:

  • This migration does not include additional logic to support OCI-based chart URIs.

  • As of this writing, Helm has not exported the structs for Chart version 3. This PR does not change our existing check for Chart version 2 ("used in Helm/v3") or make any changes to support Chart version 3. When this is published, we'll need to add additional logic and potential refactor further to support it.

  • Some packages shifted in import paths to support versioned APIs. E.g. helm.sh/helm/v3/chart --> helm.sh/helm/v4/chart/v2 - this is a "breaking change", but generally only "breaking" because the import path isn't 1 to 1. If I recall correctly, accounting for the import path gave us the original functionality.

  • Where relevant, I tried to use appropriate import path aliases to clarify what we're working with (e.g. helm.sh/helm/v4/chart/v2 has a package name v2 and should be aliased as chartv2, making room for a future chartv3.

  • Helm previously had some functions that accepted logging functions, which we leveraged. That API has changed to support a slog.Handler, so I've added on here to maintain the original logging API used in Chart Verifier. I have a future patch partially prepared to migrate Chart Verifier to slog from the standard library.

  • Helm/v4 provides some new functions for working with "Release" and "Chart" resources that we're introducing here. The design of these APIs is a little bit tricky, and hides some functionality behind interfaces that we otherwise used directly in structs. Typically, this is done to give users a stable API for resolving to the correct version of a given chart. You'll see these changes mostly in RenderManifests. I preferred to maintain the existing logic for now. We can revisit if we'd like to change the way RenderManifests works fundamentally at a later time.

@komish komish requested a review from caxu-rh June 11, 2026 21:24
@github-actions

Copy link
Copy Markdown

Thanks for your pull request!

A maintainer will review this pull request and trigger functional testing by adding the ok-to-test label.

This comment was auto-generated by GitHub Actions.

@komish komish requested review from jsm84 and mgoerens June 11, 2026 21:24
@komish komish added the ok-to-test Used after code review to run E2E/integration tests. label Jun 11, 2026

@mgoerens mgoerens 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.

Thanks @komish for your work ! A few small comments.

Also, CI is failing and I don't think that is expected.

Comment thread internal/chartverifier/utils/slog_adapter.go Outdated
Comment thread pkg/chartverifier/report/types.go Outdated
Comment thread pkg/chartverifier/reportsummary/types.go Outdated
@komish komish force-pushed the helmv4-migration branch from 6126c90 to 554cc8e Compare June 16, 2026 14:30
@github-actions github-actions Bot removed the ok-to-test Used after code review to run E2E/integration tests. label Jun 16, 2026
@komish komish force-pushed the helmv4-migration branch from 554cc8e to 406dd42 Compare June 16, 2026 14:35
Many changes just required an import statement change (/v3 to /v4).
In some cases, the import path changed due to subversion changes
in the helm packages (e.g. the "chart" package becomes "chart/v2" to
allow room for a future "chart/v3" in Helm's API).

Some minor logic changes were made with an explicit goal of keeping
behavior identical to helm/v3. Behavior can change at a later date,
if needed.

Finally, this migration adds a slog adapter for local logging functions
to preserve behavior. In the future, we will likely adopt the slog
package for Chart Verifier logging.

Signed-off-by: Jose R. Gonzalez <komish@flutes.dev>
@komish komish force-pushed the helmv4-migration branch from 406dd42 to 2b222ca Compare June 16, 2026 14:38
@komish

komish commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

The recent pushes should include fixes to the Uninstall() workflow that was causing it to fail prematurely due to not having a configured wait strategy on the Uninstall client.

Also fixes a bug in the slogging adapter where we would not properly pass through mutexes and byte buffers with derivative loggers (e.g. those created via the With* methods) were used.

@komish komish added the ok-to-test Used after code review to run E2E/integration tests. label Jun 16, 2026
@komish komish requested a review from mgoerens June 16, 2026 15:49

@mgoerens mgoerens 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.

/lgtm

@komish komish merged commit 1bf8aac into redhat-certification:main Jun 17, 2026
16 checks passed
@github-actions github-actions Bot removed the ok-to-test Used after code review to run E2E/integration tests. label Jun 17, 2026
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.

2 participants