feat: new deployments start empty instead of pre-filled with chart defaults - #25
Conversation
…faults Read the chart's values.yaml to discover alert key names, then write each as an empty array to override subchart defaults. Non-array keys like _common are excluded. Closes #23
|
Preview environment torn down. |
📝 WalkthroughWalkthroughThe ChangesInit values generation
Sequence Diagram(s)Not applicable. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The new test covers multiple array keys and
Both are currently handled by the try/catch, but explicit tests would lock down the contract. Also noticed that the |
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 `@server/routes/folders.js`:
- Around line 154-161: Validate the chart input in the folder route before
building chartDir so it cannot contain .. segments or be an absolute path; the
unsafe path handling currently affects the chart-related fs.readFile calls for
Chart.yaml and values.yaml. Update the chart parameter handling in the same area
as the folder checks to reject traversal attempts, and keep the rest of the
wrapValues/defaults logic unchanged.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c54b64d8-361c-446b-8bce-2ccfe7fb19ad
📒 Files selected for processing (2)
server/routes/folders.jstests/integration/folders-api.test.js
Summary
POST /folders/initnow writes empty arrays for each alert key instead of copying the chart's default values_common) are excluded from the empty deployment_commonexclusionCloses #23
Summary by CodeRabbit