You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Helmfile autodiscovery: condition and target fail with "absolute path not allowed" when scmid is set #10108
The Helmfile autodiscovery plugin generates conditions and targets using an
absolute file path, which causes every generated pipeline to fail with:
init yaml files: absolute path "/tmp/updatecli/.../helmfile.yaml" is not allowed:
files must stay within the working directory "/tmp/updatecli/..."
Version
v0.120.1
Steps to reproduce
Configure a helmfile crawler in autodiscovery with an scmid.
Run updatecli diff.
All helmfile-derived pipelines fail at the condition step with the above error.
The target is skipped due to dependsOn conditions.
Root cause
In pkg/plugins/autodiscovery/helmfile/releases.go, relativeFoundChartFile
is correctly computed on line 67 but the File field on line 229 is assigned foundHelmfile (the absolute path) instead:
// line 67 — relative path is computedrelativeFoundChartFile, err:=filepath.Rel(h.rootDir, foundHelmfile)
// line 229 — absolute path is used insteadFile: foundHelmfile, // ← should be relativeFoundChartFile
The ManifestName and ConditionName fields on lines 213 and 217 already use relativeFoundChartFile correctly — File is the only field that doesn't.
Fix
File: relativeFoundChartFile,
Related
This is the same bug fixed for the updatecli autodiscovery plugin in #9759.
That PR corrected the identical pattern in pkg/plugins/autodiscovery/updatecli/policies.go but the helmfile plugin was
not updated at the same time.
Activity
fix(autodiscovery/helmfile): use relative file path in generated mani…