helmfile/pkg/state
Shane Starcher 6673ebad84
fix: skip chartify for build command jsonPatches (#2212)
The build command is intended to be a read-only inspection command that
outputs the helmfile state. However, when releases use jsonPatches,
strategicMergePatches, or transformers, the chart preparation step
triggers chartify, which runs helm template and requires dependencies to
be built.

This causes two issues:
1. helm template is executed unnecessarily for a simple state inspection
2. Missing chart dependencies cause errors even with SkipDeps enabled

This change modifies PrepareCharts to filter out releases that require
chartify when the command is "build". These releases are excluded from
chart preparation, preventing helm template from being invoked.

The state output will still include these releases, but their charts
won't be processed during the build operation.

Signed-off-by: Shane Starcher <shanestarcher@gmail.com>
2025-10-05 07:39:54 +08:00
..
testdata feat: inject cli state values (--state-values-set) into environment templating context (#1917) 2025-02-14 20:49:07 +08:00
chart_dependency.go fix: two releases using the same chart in different version fails (#1685) 2024-09-12 20:26:45 +08:00
chart_dependency_test.go fix: two releases using the same chart in different version fails (#1685) 2024-09-12 20:26:45 +08:00
create.go Fix panic when helm isn't installed (#2169) 2025-09-09 07:15:46 +08:00
create_test.go chore: fix typo in create_test.go (#2025) 2025-05-05 22:39:20 +08:00
diff_error_propagation_test.go Fix error propagation in helmfile diff when Kubernetes is unreachable (#2149) 2025-09-02 12:51:17 -04:00
environment.go feat(state): add missingFileHandlerConfig and related logic (#2105) 2025-07-21 19:15:51 -04:00
envvals_loader.go feat: inject cli state values (--state-values-set) into environment templating context (#1917) 2025-02-14 20:49:07 +08:00
envvals_loader_test.go feat: inject cli state values (--state-values-set) into environment templating context (#1917) 2025-02-14 20:49:07 +08:00
helmx.go Remove deprecated --wait-retries flag support to fix Helm compatibility error (#2179) 2025-09-11 13:57:28 +08:00
helmx_test.go Remove deprecated --wait-retries flag support to fix Helm compatibility error (#2179) 2025-09-11 13:57:28 +08:00
release.go feat: execute templates against postRendererHooks (#1839) 2025-01-28 09:34:59 -05:00
release_error.go
release_filters.go
release_filters_test.go chore: add tests for release filters (#1629) 2024-07-16 09:45:42 +08:00
release_test.go refactor(yaml): upgrade from gopkg.in/yaml.v2 to v3 (#2039) 2025-05-15 10:21:37 -04:00
selector_test.go feat: add labels for helm release (#1046) 2025-03-30 19:24:41 -04:00
state.go fix: skip chartify for build command jsonPatches (#2212) 2025-10-05 07:39:54 +08:00
state_exec_tmpl.go Expose release version as .Release.ChartVersion for templating (#2080) 2025-06-17 19:41:42 +08:00
state_exec_tmpl_test.go Expose release version as .Release.ChartVersion for templating (#2080) 2025-06-17 19:41:42 +08:00
state_gogetter_test.go
state_run.go
state_test.go Fix enableDNS flag missing in diff command and refactor duplicate logic (#2147) 2025-08-27 14:32:17 +08:00
storage.go
storage_test.go
temp.go
temp_test.go feat(state): add missingFileHandlerConfig and related logic (#2105) 2025-07-21 19:15:51 -04:00
types.go Expose release version as .Release.ChartVersion for templating (#2080) 2025-06-17 19:41:42 +08:00
util.go
util_test.go