fix(power-agent): keep apiVersion off SPDX comment line - #12651
Conversation
Drop the trailing whitespace-trim on the silent validateTerminationGracePeriod include so helm does not glue apiVersion onto the SPDX comment (DYN-3741 / NVBug 6555989). Add isAPIVersion helm-unittest coverage; template/lint stay green on the broken render and the old suite did not catch it. Signed-off-by: Kai Ma <kaim@nvidia.com>
WalkthroughThe Helm DaemonSet and development Pod templates now preserve whitespace around termination grace-period validation. A new unittest suite verifies that rendered resources retain valid ChangesHelm template rendering
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@deploy/helm/charts/power-agent/tests/api_version_whitespace_test.yaml`:
- Around line 4-5: Replace the internal ticket reference “DYN-3741” in the
regression comment with its mapped GitHub issue reference from
.ai/linear-ticket-refs.md, preserving the rest of the comment unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 77a41f27-e92b-46ff-8be1-155d0419f01b
📒 Files selected for processing (3)
deploy/helm/charts/power-agent/templates/daemonset.yamldeploy/helm/charts/power-agent/templates/dev-pod.yamldeploy/helm/charts/power-agent/tests/api_version_whitespace_test.yaml
Rewrite the regression-test comment without Linear/NVBug IDs and bump the chart patch version so the install-blocking apiVersion fix is a distinct chart artifact on main and release/1.4.0. Signed-off-by: Kai Ma <kaim@nvidia.com>
|
/ok to test cafb4f5 |
This comment has been minimized.
This comment has been minimized.
dagil-nvidia
left a comment
There was a problem hiding this comment.
Approving. Verified for 1.4.0 release triage (NVBug 6555989 / DYN-3741, P1).
- Root cause is correctly identified: the
-}}right-trim on the silentvalidateTerminationGracePeriodinclude consumed the newline beforeapiVersion, rendering# SPDX-License-Identifier: Apache-2.0apiVersion: apps/v1. - Both call sites are fixed.
validateTerminationGracePeriodis included in exactly two templates (daemonset.yaml,dev-pod.yaml) and both moved to}}, so no third site is left trimming. - The new suite asserts the real failure mode rather than the symptom:
isAPIVersionplus an explicitequalon theapiVersionpath, across both the DaemonSet default path and the dev-pod path. Worth noting the PR's own point thathelm templateandhelm lintboth exit 0 on the broken render, which is why the existing suite stayed green. - Chart version 1.3.0 -> 1.3.1 with appVersion held, which is right for a template-only change.
Full CI is green (71 passing, 0 failing).
|
Approved. The two open bot threads are stale. Both flag No Linear or NVBug reference remains in any of the four files in this PR, so the Both active rulesets set Resolving the two threads unblocks it. For 1.4.0 tracking: this is the main-side fix for NVBug 6555989 (P1). The cherry-pick is #12652, which is green apart from the |
… (#12652) Signed-off-by: Kai Ma <kaim@nvidia.com>
Summary
helm installofdeploy/helm/charts/power-agentfailed withapiVersion not setbecause a trailing whitespace-trim (-}}) on the silentvalidateTerminationGracePeriodinclude gluedapiVersiononto the SPDX comment (Apache-2.0apiVersion: apps/v1).-indaemonset.yamlanddev-pod.yaml(Fix A).isAPIVersionhelm-unittest coverage.helm template/helm lintexit 0 on the broken render; the previous 48 unittests stayed green because nothing assertedapiVersion.Validation
helm template ... --set image.tag=v1.4.0emits standaloneapiVersion: apps/v1(DaemonSet) andapiVersion: v1(dev pod)make lintindeploy/helm/charts/power-agentmake test— 50 passed (incl. newapi_version_whitespace_test.yaml)Related
release/1.4.0for RCSummary by CodeRabbit
apiVersionfield correctly in DaemonSet and development Pod manifests.