Skip to content

fix(bundler): correct helmfile bundle README for stratified layout#959

Merged
lockwobr merged 2 commits into
mainfrom
fix/bundle-helmfile-readme
May 18, 2026
Merged

fix(bundler): correct helmfile bundle README for stratified layout#959
lockwobr merged 2 commits into
mainfrom
fix/bundle-helmfile-readme

Conversation

@lockwobr

Copy link
Copy Markdown
Contributor

Summary

The README baked into every multi-level helmfile bundle still described the pre-DAG-stratification layout (crds.yaml + releases.yaml) — files the bundler hasn't emitted since #926. Rewrite the conditional README block and rename the now-misnamed HasCRDLayer field.

Motivation / Context

Operators reading the auto-generated README in their bundle would hunt for crds.yaml / releases.yaml that don't exist; the actual sub-helmfiles are level-0.yamllevel-N.yaml. The deployment itself works (helmfile.yaml is correct), but the docs mislead. The opening framing ("For bundles that include CRD-owning charts…") is also no longer accurate — the gate is now "DAG produced >1 level", which any recipe with two unrelated components linked by a dependencyRef would also trigger.

Fixes: #927
Related: #926, #914

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Documentation update

Component(s) Affected

  • Bundlers (pkg/bundler, pkg/component/*)

Implementation Notes

  • Rewrote the {{ if .HasCRDLayer }} block in templates/README.md.tmpl to describe the stratified layout (one sub-helmfile per dependency level, level-0.yaml first, processed sequentially).
  • Renamed readmeData.HasCRDLayerHasSubHelmfiles and the local splitLayoutstratified so the name matches what it now gates on.
  • Regenerated pkg/bundler/deployer/helmfile/testdata/upstream_helm_only/README.md via go test -update.

Testing

go test ./pkg/bundler/deployer/helmfile/...                   # ok (1.221s)
golangci-lint run -c .golangci.yaml ./pkg/bundler/deployer/helmfile/...  # 0 issues

Coverage delta (pkg/bundler/deployer/helmfile): no test code added/changed; the rename is exercised by the existing golden suite which still passes.

Risk Assessment

  • Low — Isolated change to bundle README generation; no behavior change in emitted manifests. The field rename is internal to the package.

Rollout notes: N/A — pure docs/identifier fix.

Checklist

  • Tests pass locally (make test with -race) — package-scoped run
  • Linter passes (make lint) — package-scoped run
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality — N/A (golden regenerated)
  • I updated docs if user-facing behavior changed (the bundle README is the doc)
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)

The README template baked into every multi-level helmfile bundle still
described the pre-DAG-stratification layout (`crds.yaml` first, then
`releases.yaml`) — files the bundler hasn't emitted since #926. Operators
reading the generated README hunt for files that don't exist.

Rewrite the conditional block to describe the actual stratified layout
(one `level-N.yaml` per dependency level, processed sequentially), and
rename `readmeData.HasCRDLayer` → `HasSubHelmfiles` plus the local
`splitLayout` → `stratified` so the field name matches what it now
gates on (DAG produced >1 level, not "bundle includes CRD-owning
charts"). Regenerate the affected golden.

Fixes #927
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: a2831231-2c47-439c-9f9c-bfdde9a70c4f

📥 Commits

Reviewing files that changed from the base of the PR and between 60d24d0 and f5e83cb.

📒 Files selected for processing (3)
  • pkg/bundler/deployer/helmfile/helmfile.go
  • pkg/bundler/deployer/helmfile/templates/README.md.tmpl
  • pkg/bundler/deployer/helmfile/testdata/upstream_helm_only/README.md

📝 Walkthrough

Walkthrough

This PR updates the Helmfile bundler to rename and clarify the concept of multi-level helmfile bundles throughout the codebase. The HasCRDLayer struct field is renamed to HasSubHelmfiles, the splitLayout boolean is renamed to stratified, and function signatures are updated to reflect this terminology. The README template and golden test data are updated to describe the actual multi-level orchestration (level-0.yaml, level-1.yaml, etc.) instead of the obsolete crds.yaml/releases.yaml naming.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • NVIDIA/aicr#922: Refactors the README generation data model for the CRD-first split layout, directly modifying the same writeReadme and template wiring in helmfile.go.
  • NVIDIA/aicr#926: Introduced the stratified layout mechanism that this PR now names and documents correctly.

Suggested labels

area/bundler

Suggested reviewers

  • mchmarny
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: correcting the helmfile bundle README for stratified layout, which is the core fix described throughout the PR.
Description check ✅ Passed The description is directly related to the changeset, providing context about the outdated README instructions, motivation for the change, and implementation details of the fix.
Linked Issues check ✅ Passed All acceptance criteria from issue #927 are met: the README block is rewritten for stratified layout [#927], HasCRDLayer is renamed to HasSubHelmfiles [#927], splitLayout is renamed to stratified [#927], and the golden README is regenerated [#927].
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the helmfile bundle README generation: template updates, identifier renames, and golden test data regeneration. No unrelated modifications are present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bundle-helmfile-readme

Comment @coderabbitai help to get the list of available commands and usage tips.

@lockwobr lockwobr enabled auto-merge (squash) May 18, 2026 23:31
@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Coverage Report ✅

Metric Value
Coverage 76.6%
Threshold 75%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-76.6%25-green)

Coverage unchanged by this PR.

@lockwobr lockwobr merged commit 04e4418 into main May 18, 2026
32 checks passed
@lockwobr lockwobr deleted the fix/bundle-helmfile-readme branch May 18, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(bundler): helmfile bundle README ships stale crds.yaml/releases.yaml instructions

2 participants