fix(engine): gitlab subchart coalesce — global propagation + disabled-subchart pruning (A/B/C) (#21)#508
Merged
Merged
Conversation
…rt pruning (#21) Two coalesce bugs in the parent-visible .Values tree that block gitlab parity (jhelm previously patched both only at render-dispatch, so manifests rendered but toYaml(.Values) — and the gitlab.jobNameSuffix sha256 — diverged): A. Bake the full top-level .Values.global into every subchart in the coalesced tree (coalesceChartValues threads topGlobal; parent global wins), matching Helm. .Values.<sub>.global 30 -> 528 (Helm 533). B. Skip coalescing a subchart's defaults when its dependency `condition` is false (isSubchartEnabledForCoalesce, reusing the existing condition evaluator). Disabled subcharts now match Helm's parent-stub exactly (traefik 6=6, openbao 42=42, haproxy 12=12, gitlab-zoekt 7=7). gitlab's coalesced .Values goes 5850 -> 15135 lines (Helm 13031). gitlab is not yet closed — a remaining global over-propagation into an enabled subchart's own subcharts (prometheus.*) leaves ~+2100 lines; documented in failed.csv as the next step (C). Verified: 346/346 chart byte-parity green; 153 jhelm-core coalesce unit tests green (EngineTest, SubchartValuePropagationTest, NestedSubchartValuesTest, …); gitlab renders without error. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5yvjG89AqMHPAGJawSmg9
Contributor
Files
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…onditions (#21) Fix C of the gitlab subchart-coalesce work. coalesceChartValues now threads the parent's overrides into the recursion and evaluates each nested dependency's condition against the effective (base + override) values, so an umbrella that disables a grandchild — e.g. prometheus.kube-state-metrics.enabled=false — prunes that grandchild's defaults from .Values, matching Helm's ProcessDependencies. Combined with A (global propagation) and B (direct disabled-subchart pruning), jhelm's coalesced gitlab .Values goes 5850 -> 12395 lines (Helm 13031) — 91% of the gap closed, prometheus 3655 -> 915, disabled subcharts exact. Diagnosis recorded in failed.csv: every remaining gitlab manifest diff is a content hash (jobNameSuffix + checksum/config), both tracing to the SAME residual .Values.global gap (jhelm 522 vs Helm 531 lines for webservice). jhelm's sha256sum and include framing were verified byte-identical to the CLI/Go, so it is purely the coalesced global. The last ~9 lines/subchart (D) is null/empty handling: jhelm prunes propagated-global nulls that Helm keeps. Verified: 346/346 chart byte-parity green; jhelm-core coalesce unit tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5yvjG89AqMHPAGJawSmg9
Contributor
Files
|
Contributor
Files
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Concrete progress on the long-standing gitlab subchart-coalesce parity (#21), each step gated on the 346-chart parity staying green.
Three coalesce fixes
The parent-visible
.Valuestree (which feedstoYaml(.Values)and thegitlab.jobNameSuffix/checksum/confighashes) diverged from Helm — jhelm patched these only at render-dispatch, so manifests rendered but the hashes didn't..Values.globalinto every subchart in the coalesced tree.conditionis false. Disabled subcharts now match Helm's stub exactly (traefik 6=6, openbao 42=42, …).prometheus.kube-state-metrics.enabled=falseprunes that grandchild).Result: jhelm's coalesced gitlab
.Values5850 → 12395 lines (Helm 13031) — 91% of the gap closed; prometheus 3655→915; disabled subcharts exact.Diagnosis: every remaining diff is one root cause
Full manifest diff (jhelm vs helm): identical 146-resource set, all 21 ConfigMaps byte-identical. The only diffs are content hashes — 4 Job names + 5
checksum/configannotations — plus one ignorable random test-Pod name. Verified jhelm'ssha256sumandincludeframing are byte-identical to the CLI/Go, so both hash families trace to the same residual: jhelm's coalesced.Values.global(webservice sees 522 lines vs Helm's 531).Not yet closed (D, documented in failed.csv)
The last ~9 lines/subchart is null/empty handling — jhelm prunes propagated-global nulls that Helm keeps (
when/dsn/environment: null) and collapsesauthToken {key,secret:""}→{}. Closing D makestoYaml(.Values.global)exact, fixing both hash families → gitlab passes. It touches the #491 selective-null logic, so it needs its own careful, parity-gated pass.Part of #21.
🤖 Generated with Claude Code