fix(automatisch): align template standards#648
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds Helm pre-render validation for external database, Redis, ingress, and podLabels configuration. It wires the validation into ChangesConfiguration validation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant HelmRender
participant validate_yaml as validate.yaml
participant Helper as automatisch.validate
HelmRender->>validate_yaml: render templates
validate_yaml->>Helper: include automatisch.validate
Helper-->>Helper: check postgresql.enabled, redis.enabled, ingress.enabled, podLabels
alt validation fails
Helper-->>validate_yaml: fail with error message
validate_yaml-->>HelmRender: render error
else validation passes
Helper-->>validate_yaml: no error
validate_yaml-->>HelmRender: rendered output
end
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Standards Check (GR-079) — PASSEvery changed chart fully passes standards-check. |
🟢 Security Scan:
|
| Framework | Score |
|---|---|
| MITRE + NSA + SOC2 | 82.323235% |
✅ Security posture acceptable.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
charts/automatisch/templates/_helpers.tpl (1)
62-66: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSelector label keys duplicated as string literals.
"app.kubernetes.io/name"and"app.kubernetes.io/instance"are hardcoded here but also defined viaautomatisch.selectorLabels(Lines 29-32). If a selector label key is added/changed there later, this guard would silently miss it.Consider deriving the disallowed keys from a shared list/helper to keep both in sync.
🤖 Prompt for 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. In `@charts/automatisch/templates/_helpers.tpl` around lines 62 - 66, The selector-label guard in automatisch.selectorLabels is hardcoding disallowed podLabels keys, which can drift from the shared selector labels definition. Update the check in _helpers.tpl to derive the protected keys from the same source used by automatisch.selectorLabels, or refactor both to share a common helper/list, so any future selector label key changes stay in sync automatically.
🤖 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.
Nitpick comments:
In `@charts/automatisch/templates/_helpers.tpl`:
- Around line 62-66: The selector-label guard in automatisch.selectorLabels is
hardcoding disallowed podLabels keys, which can drift from the shared selector
labels definition. Update the check in _helpers.tpl to derive the protected keys
from the same source used by automatisch.selectorLabels, or refactor both to
share a common helper/list, so any future selector label key changes stay in
sync automatically.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: be273cc6-ef51-4015-99bd-6e9c73a4ba58
📒 Files selected for processing (3)
charts/automatisch/templates/_helpers.tplcharts/automatisch/templates/validate.yamlcharts/automatisch/tests/validation_test.yaml
ee5de23 to
a2f5b22
Compare
|
Addressed the CodeRabbit review-body nitpick. Changes:
Validation:
Note: this CodeRabbit item was posted in the review summary/body, not as an active review thread, so there is no thread ID to reply to or resolve for it. |
Summary
Validation
Site PR: helmforgedev/site#328
Issue: #633
Summary by CodeRabbit