operator: render customizeComponents flags in a stable order #4327
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 151 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.301
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4327"
general
weight: 0.35
Acedus
What this PR does / why we need it:
flagsToArrayin the operator loops over a map, so the order of the container args it renders is random. If you put two or more flags incustomizeComponents.flags, the operator renders a different Deployment on almost every reconcile and keeps rolling out new pods. I saw the Deployment generation go up every few seconds with 100+ pods terminating.This sorts the flags by name so the output is the same every time. The new test checks the order 50 times and fails without the fix. The existing tests only used one flag or checked substrings, so this was never caught.
Split out of #4325 at Acedus's request so it can be backported.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Special notes for your reviewer:
Covered by unit tests only (operator controller tests, gofmt, golangci-lint). I haven't run the fixed operator on a cluster.
Release note:
``
release-note
``Fix customizeComponents.flags rendering the container args in a random order, which made the operator continuously roll out the deployments when more than one flag was set.