Repository navigation
fix: skip chartify for build command jsonPatches - #2212
Merged
Merged
Conversation
sstarcher
requested review from
itscaro,
mumoshu,
xiaomudk,
yxxhero and
zhaque44
as code owners
October 4, 2025 19:24
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 <[email protected]>
sstarcher
force-pushed
the
feature/shane-build
branch
from
October 4, 2025 19:45
aff4d4b to
4a2cfb9
Compare
yxxhero
approved these changes
Oct 4, 2025
yxxhero
added a commit
to yxxhero/helmfile
that referenced
this pull request
Jul 12, 2026
…pace (helmfile#1859) The build command is read-only and runs with SkipRepos: true, meaning repositories are not synced. However, releases with dependencies or forceNamespace trigger chartify (PrepareChartify in helmx.go), which runs helm fetch/pull/template and requires repos — causing "repo <repo> not found" errors. PR helmfile#2212 partially addressed this by filtering releases with jsonPatches, strategicMergePatches, and transformers. This change extends the filter to also cover dependencies and forceNamespace, completing the fix for issue helmfile#1859. The filter is refactored into triggersChartifyRemote() which mirrors all conditions in PrepareChartify that set shouldRun=true and require network access. The local-directory case (NeedsChartifyForLocalDir) is excluded as it operates on local paths without needing remote repos. Signed-off-by: yxxhero <[email protected]> Signed-off-by: yxxhero <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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:
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.