fix(health): exempt manifest-only Helm components from chart_pinned#1303
fix(health): exempt manifest-only Helm components from chart_pinned#1303njhensley wants to merge 1 commit into
Conversation
classifyChartPinned flagged any enabled Helm-typed component with an empty Version as fail, with no exemption for components that have no external chart to pin. nodewright-customizations is typed Helm but ships local manifestFiles with empty chart/source/version, so it was reported as an unpinned chart on all 17 recipes that include it — a false positive against a non-existent pin. Skip manifest-only Helm components (empty Chart and Source, manifests present) the same way disabled components are skipped: not counted toward helmCount, never added to the unpinned list. Detection mirrors the bundler's manifest-only check, keeping the health signal aligned with what is actually bundled and deployed. Restores an honest public matrix per ADR-009: chart_pinned now reports 0/32 recipes failing (was 17/32).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR extends the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
chart_pinnedflagged manifest-only "Helm" components (typedHelmbut shipping localmanifestFileswith no external chart) as unpinned. This exempts them, since there is no chart version to pin.Motivation / Context
Running the health generator against current main reported 17 of 32 recipes as
fail— every one for the same reason:nodewright-customizationsis a manifest-only component: overlays declare ittype: Helmbut it ships localmanifestFileswith empty repository/chart/version. The mergedclassifyChartPinned(#1226) flags any enabled Helm ref with an emptyVersionasfailand did not exempt components with no external chart to pin — so this was a false-positive class, not a real pinning gap.This matters because ADR-009 is emphatic that the public matrix must never mislead ("a stale public 'health' surface is worse than none"). Publishing a doc that says half the catalog fails — when it is really one known false-positive class — would do exactly that.
Fixes: N/A
Related: #1226, #1293
Type of Change
Component(s) Affected
pkg/health)Implementation Notes
isManifestOnlyHelm(ref)— a Helm-typed ref with emptyChartandSourcebut non-emptyManifestFiles/PreManifestFiles. This mirrors the bundler's canonical manifest-only detection (pkg/bundler/deployer/flux/flux.go:ref.Chart == "" && ref.Source == "" && hasManifests), keeping the health signal aligned with what is actually bundled and deployed.classifyChartPinnednow skips manifest-only refs the same way it skips disabled components: not counted towardhelmCount, never added to theunpinnedlist.Testing
TestClassifyChartPinned: manifest-only alongside a pinned chart → pass; manifest-only not appearing in the unpinned list; manifest-only-only → vacuous "not applicable" pass. They fail before the change and pass after.chart_pinnedwent from 17/32 fail → 0/32 fail.-racecould not run in the dev sandbox (no cgo/gcc) andgolangci-lintis not on PATH locally; CI covers both.Risk Assessment
Rollout notes: N/A — read-only health signal; no API, schema, or deployment behavior changes.
Checklist
make testwith-race) —-raceunavailable in sandbox (no cgo);go test ./pkg/health/passes, CI runs-racemake lint) —golangci-lintnot on PATH locally;go vet+gofmtclean, CI runs the pinned lintergit commit -S)