helmfile/pkg/helmexec
Aditya Menon 5c43fa6465
fix: support OCI chart digest syntax (@sha256:...) (#2398)
fix: support OCI chart digest syntax in chart URLs and version fields

Helm supports pinning OCI chart images by digest (@sha256:...), version
tag (:version), or both (:version@sha256:digest) since helm/helm#12690.
Helmfile failed to parse these formats, incorrectly constructing helm
commands and losing version/digest information embedded in chart URLs.

Root causes:
- resolveOciChart() used last ":" to find version tag, but sha256:abc
  contains ":", so digest URLs were split incorrectly
- getOCIQualifiedChartName() included :version and @digest in chartName
  with no parsing of either source
- appendChartVersionFlags() passed release.Version verbatim to --version
  flag, including any digest suffix
- ChartPull() discarded the tag from resolveOciChart but did not
  preserve digest in the URL

This commit adds parseOCIChartRef() and parseVersionDigest() utilities,
then updates the OCI chart handling pipeline so that:
- Digests are preserved in the chart URL passed to helm pull
- Version tags are extracted cleanly for the --version flag
- Both chart URL and version field are parsed for version/digest info

Fixes #2097

Signed-off-by: Aditya Menon <amenon@canarytechnologies.com>
2026-02-12 20:20:43 +08:00
..
testdata fix: support large output with --enable-live-ouput (#1139) 2023-11-12 06:45:08 +08:00
context.go Drop Helm v2 support (#613) 2023-01-17 09:24:47 +09:00
exec.go fix: support OCI chart digest syntax (@sha256:...) (#2398) 2026-02-12 20:20:43 +08:00
exec_flag_filtering_test.go feat: add Helm 4 support while maintaining Helm 3 compatibility (#2262) 2025-11-19 07:49:30 +08:00
exec_test.go fix: support OCI chart digest syntax (@sha256:...) (#2398) 2026-02-12 20:20:43 +08:00
exit_error.go Feat: add --strip-args-values-on-exit-error (#887) 2023-06-07 14:39:38 +08:00
exit_error_test.go Feat: add --strip-args-values-on-exit-error (#887) 2023-06-07 14:39:38 +08:00
helmexec.go feat: add Helm 4 support while maintaining Helm 3 compatibility (#2262) 2025-11-19 07:49:30 +08:00
id.go Print command output in line (#1354) 2020-08-29 14:47:22 +09:00
id_test.go Add unittest for newExecutionID 2022-04-24 13:55:28 +08:00
log.go Fix snapshot tests to pass regardless of helm version (#572) 2022-12-10 10:54:03 +08:00
runner.go Fix panic when helm isn't installed (#2169) 2025-09-09 07:15:46 +08:00
runner_test.go fix: support large output with --enable-live-ouput (#1139) 2023-11-12 06:45:08 +08:00