Migrate from helm/v3 to helm/v4#620
Merged
Merged
Conversation
|
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. |
mgoerens
reviewed
Jun 15, 2026
This was referenced Jun 15, 2026
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>
Member
Author
|
The recent pushes should include fixes to the 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/v2has a package namev2and should be aliased aschartv2, making room for a futurechartv3.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 wayRenderManifestsworks fundamentally at a later time.