{{ message }}
Repository navigation
fix(getter): find getter plugins in every HELM_PLUGINS directory - #32779
Open
SkippySteve wants to merge 1 commit into
Open
SkippySteve wants to merge 1 commit into
SkippySteve wants to merge 1 commit into
Conversation
HELM_PLUGINS may hold a list of directories (like PATH), and plugin discovery for post-renderers and `helm plugin list` splits it, but collectGetterPlugins passed the whole string as a single directory. With more than one entry no getter plugin was found and downloads failed with `scheme "x" not supported`. Helm 3 split the list here too. Also name the plugin in the getter invoke error instead of formatting the whole plugin struct with %q. Signed-off-by: Steven Richards <steve@aimingupward.com>
2 of 3 tasks
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.

What this PR does / why we need it:
HELM_PLUGINScan list several directories separated by the OS path-list separator. Post-renderer lookup (filepath.SplitListinpkg/postrenderer) andhelm plugin listhandle that, butcollectGetterPluginspasses the whole string toplugin.FindPluginsas one directory:With more than one entry no getter plugin is found, so every plugin-backed scheme fails (
helm pull s3://…,git+https://…, etc.), even thoughhelm plugin listshows the plugin. Helm 3 split the list here (FindPluginsiteratedfilepath.SplitList(plugdirs)), so this is a v4 regression. The fix isfilepath.SplitList(settings.PluginsDirectory).The same file also had
fmt.Errorf("plugin %q failed to invoke: %w", g.plg, err), which formats the entire plugin struct. It now usesg.plg.Metadata().Name.Special notes for your reviewer:
End to end, with
helmbuilt frommainand from this branch. Agetter/v1subprocess plugin forgettest://sits in the second of twoHELM_PLUGINSentries:When the getter exits non-zero:
#32666 rewrites the same
FindPluginsline (toenvVars["HELM_PLUGINS"]) and also passes a single directory. Whichever lands second only needsfilepath.SplitList(...)around it.If applicable:
docs neededlabel should be applied if so)Tests:
TestCollectPluginsMultiplePluginDirs(onmain:"[]" should have 2 item(s), but has 0) andTestGetterPluginInvokeErrorNamesPlugin(onmain: the struct dump above) both pass with the change. A single-directoryHELM_PLUGINSbehaves exactly as before.go test ./pkg/getter/,go vetandgolangci-lintv2.14.0 are clean on Go 1.26.