Repository navigation
fix: honor release-level skipSchemaValidation false - #2837
Conversation
An explicit release value of false now keeps helmDefaults from adding --skip-schema-validation. The command-line flag still applies to every release. Signed-off-by: spicysharkco <321699413+spicysharkco@users.noreply.github.com>
yxxhero
left a comment
There was a problem hiding this comment.
Review
Verified the precedence logic against appendWaitFlags (pkg/state/helmx.go:763) — this now matches it exactly:
- release
skipSchemaValidation: true→ flag applied - CLI
--skip-schema-validation→ flag applied (also over an explicit releasefalse, same aswait) helmDefaults.skipSchemaValidation: true→ applied only when the release does not set the option- release
skipSchemaValidation: false→ correctly disables the helmDefaults value ✅
Also confirmed all call sites route through the single shouldSkipSchemaValidation resolver (chartify template args, upgrade, template, and diff flag builders), so every command gets the fixed behavior — no path was missed.
Tests: the two new rows correctly cover the regression (release false + defaults true — expected "", previously got --skip-schema-validation) and the CLI-over-release precedence. LGTM.
Non-blocking observation: appendTakeOwnershipFlagsForUpgrade (pkg/state/helmx.go:828-838) has the same pattern — a release-level takeOwnership: false cannot override helmDefaults.takeOwnership: true. Might be worth a follow-up for consistency.

Problem
With:
Helmfile still passes
--skip-schema-validationforexample. A release can setskipSchemaValidation, and an explicitfalsethere should win overhelmDefaults, as it does forwait.Solution
The resolver checked the release value only when it was true, so
falsefell through tohelmDefaults. ThehelmDefaultscase now applies only when the release does not set the option, the same wayappendWaitFlagstreatswait. The--skip-schema-validationcommand-line flag still applies to every release.The resolver builds the upgrade, template and diff flags and the chartify
helm templatearguments.Test
Two rows in
TestAppendSkipSchemaValidationFlagToChartifyTemplateArgs: releasefalsewithhelmDefaultstrue(failed before: expected"", got"--skip-schema-validation"), and the command-line flag with releasefalse(passes before and after).go test ./pkg/state -run '^TestAppendSkipSchemaValidationFlagToChartifyTemplateArgs$' -count=1