Repository navigation
test(bundler): pin argocd, flux, and argocd-helm READMEs with goldens - #4052
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
lockwobr
left a comment
There was a problem hiding this comment.
Thanks for contributing to AICR!
No blocking issues; 2 non-blocking comments. Address them and this is ready to approve.
| } | ||
|
|
||
| for _, rel := range []string{ | ||
| "README.md", // -post dynamic paths resolve through the parent's override key |
There was a problem hiding this comment.
issue (non-blocking): The README.md comment says the golden pins -post override-key routing, but the README never goes through the -post folder.
writeReadme builds the --set flags and the Dynamic Values list from g.DynamicValues, which this fixture keys by "gpu-operator" (the parent). It never calls the suffix-stripping path through findComponentByName. If -post routing regresses, only templates/gpu-operator-post.yaml fails, yet a reader of this line expects the README golden to catch it too.
Reword the comment to say what the README golden actually pins.
| "README.md", // -post dynamic paths resolve through the parent's override key | |
| "README.md", // inline README: --set flag and Dynamic Values for a nested path |
| // TestGenerate_UpgradeNotice covers a non-empty notice. The README goldens | ||
| // pin only the empty-notice render, so the empty case also asserts the | ||
| // Components table still runs straight into Prerequisites. |
There was a problem hiding this comment.
nit (non-blocking): The "so the empty case also asserts" reason no longer follows, because the new goldens pin the empty-notice render.
Before this PR, the empty case stood in for a missing golden. Now the golden pins that render, so the clause gives a reader the wrong reason for the assertion. The same sentence is at pkg/bundler/deployer/flux/flux_test.go:1496-1498.
In both files, drop the "so" clause, for example: "TestGenerate_UpgradeNotice covers both the empty and non-empty notice renders; the README golden(s) pin only the empty one."
Recipe evidence checkNo leaf overlays affected by this PR. This gate is warning-only and never blocks merge. |
|
Thanks @lockwobr — updated the argocdhelm README golden comment and dropped the stale "so" clause in the argocd and flux UpgradeNotice comments. |
35b8510 to
3d995b3
Compare
|
Rebased onto the latest main (dependency updates only) so the branch is no longer behind. |
mchmarny
left a comment
There was a problem hiding this comment.
Welcome to the project, and thank you for your contribution!
Request changes: 1 MAJOR against 3d995b3. CI has not run at the reviewed SHA because this fork PR's workflows are awaiting maintainer approval.
MAJOR: The base branch main requires signed commits, and GitHub reports 2 commits in this PR as unverified: 5e7aaf7 (unknown_key), 3d995b3 (unknown_key).
Minimum correction: re-sign every listed commit and force-push:
git fetch origin main
git rebase --exec 'git commit --amend -s -S --no-edit' origin/main
git push --force-with-lease --force-if-includes origin <branch>
See CONTRIBUTING.md — Developer Certificate of Origin for key setup, the fresh-clone fallback, and safe force-push details. Please note the old and new SHAs here after rewriting.
The argocd, flux, and argocd-helm bundle READMEs were covered only by
substring checks, so a change to their commands or wording passed CI
unseen. Add README.md to the existing TestBundleGolden_* fixtures so
template changes surface as a reviewable golden diff:
- argocd: helm_and_manifest_only (Helm and local-chart rows) and
mixed_with_pre (pre, primary, and post folders by sync wave)
- flux: helm_components (dependsOn column)
- argocd-helm: helm_and_manifest_only and mixed_component (install
commands, dynamic --set flags, and the Dynamic Values section)
Regenerate with:
go test ./pkg/bundler/deployer/{argocd,flux,argocdhelm}/... -run TestBundleGolden -args -update
Fixes: NVIDIA#4039
Signed-off-by: Shubham <[email protected]>
Reword the argocdhelm mixed_component README golden comment so it describes the --set flags and Dynamic Values the README actually pins, not -post override-key routing. Drop the stale "so the empty case also asserts" clause from the TestGenerate_UpgradeNotice comments in argocd and flux. Signed-off-by: Shubham <[email protected]>
3d995b3 to
477364c
Compare
|
Rebased onto the latest main (dependency updates only) so the branch is no longer behind. |
Summary
Pin the
argocd,flux, andargocd-helmbundle READMEs with byte-for-byte goldens, so a change to their commands or wording shows up as a reviewable diff.Motivation / Context
These three READMEs were covered only by substring checks, so a change like #4036 passed CI without anyone seeing the rendered result.
Fixes: #4039
Related: N/A
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)Implementation Notes
README.mdis added to the existingTestBundleGolden_*fixtures, using each package'sassertGoldenand-updateflag:argocd:helm_and_manifest_only(Helm and local-chart rows) andmixed_with_pre(pre, primary, and post folders in sync-wave order)flux:helm_components(the Depends On column)argocd-helm:helm_and_manifest_onlyandmixed_component(install commands, dynamic--setflags, and the Dynamic Values section)The comment in
argocd'sTestGenerate_Successsaid the README couldn't be golden-tested because of TempDir paths. The rendered README has no such paths, so I updated that comment and theTestGenerate_UpgradeNoticecomments. No generator code changed, and no existing golden changed.Regenerate with:
go test ./pkg/bundler/deployer/{argocd,flux,argocdhelm}/... -run TestBundleGolden -args -updateTesting
The goldens are stable when the tests are re-run without
-update. As a check, I edited each README source (both templates and the inlineargocdhelmbuilder). All five new golden assertions failed, then passed again after I reverted the edits.Risk Assessment
Rollout notes: N/A
Checklist
make testwith-race)make lint)git commit -s -S)