feat(bundler): structured deploy.sh output with color and step headers#1393
Conversation
- Add NO_COLOR-aware color helpers (_ok, _fail, _warn_line) - Add _step_header/ok/fail/retry for per-component section framing - Show [N/M] progress counter and manual copy-paste command per step - Color-code pre-flight pass/fail and final deployment summary Closes NVIDIA#1362
|
Welcome to AICR, @mohityadav8! Thanks for your first pull request. Before review, please ensure:
A maintainer will review this soon. |
|
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:
📝 WalkthroughWalkthroughThe deploy script template ( Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 `@pkg/bundler/deployer/helm/templates/deploy.sh.tmpl`:
- Around line 70-73: In the _step_header function, the second printf statement
prints the directory path without quotes in the manual execution instruction.
Add quotes around the path parameter in the printf format string so that when
the bundle path is substituted, it will be properly escaped for shell copy-paste
commands. This ensures paths containing spaces or special characters will not
break the displayed command.
🪄 Autofix (Beta)
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: ASSERTIVE
Plan: Enterprise
Run ID: f957c905-4a38-4094-9c8a-ca0384a6bcf5
📒 Files selected for processing (7)
pkg/bundler/deployer/helm/templates/deploy.sh.tmplpkg/bundler/deployer/helm/testdata/kai_scheduler_present/deploy.shpkg/bundler/deployer/helm/testdata/manifest_only/deploy.shpkg/bundler/deployer/helm/testdata/mixed_gpu_operator/deploy.shpkg/bundler/deployer/helm/testdata/mixed_with_pre/deploy.shpkg/bundler/deployer/helm/testdata/nodewright_present/deploy.shpkg/bundler/deployer/helm/testdata/upstream_helm_only/deploy.sh
mchmarny
left a comment
There was a problem hiding this comment.
Welcome to AICR, @mohityadav8 — and thanks for picking this up! This is a genuinely nice quality-of-life improvement to deploy.sh: the NO_COLOR + non-TTY detection is done correctly, the helpers are clean, and the per-step [N/M] framing makes a long install far easier to follow. Regenerating all 6 testdata goldens alongside the template is exactly the right discipline, too.
One thing blocks merge: the goldens are out of sync with the template. The _step_header quoting fix (printf -v manual_dir '%q') landed in deploy.sh.tmpl but the committed testdata/*/deploy.sh files still have the pre-fix version, so the byte-comparing TestBundleGolden_* tests will fail. A quick go test ./pkg/bundler/deployer/helm/... -run TestBundleGolden -update (then commit) fixes all six at once — details inline. The other two are small nits (loop indentation, and the Manual: hint not reflecting the env the real install uses).
Heads up: the PR is behind main, so rebasing on origin/main before re-pushing will also let the real CI gates run. Nice first contribution — this is close.
Signed-off-by: Mohit Yadav <[email protected]>
81d0873 to
de7354e
Compare
- Re-indent attempt/while/done block inside for-loop body - Add env var caveat to Manual: step hint with printf -v quoting - Regenerate all 6 testdata goldens
8e7401c to
fbd9f83
Compare
|
@mchmarny done all the suggested changes |
Closes #1362