Support Configurable Max Exponential Backoff Delay for Direct Controllers #13653
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 286 lines diff across 3 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.339
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #13653"
general
weight: 0.35
sdowell
Summary
Support configurable maximum exponential backoff delay ceiling and complete automated retry halting for direct controllers via the resource annotation:
cnrm.cloud.google.com/backoff-max-delay-in-secondsDetails & Behavior
1. Annotation:
cnrm.cloud.google.com/backoff-max-delay-in-seconds- Unset / empty: Retains default exponential retry behavior capped by controller-runtime workqueue limiter (120s ceiling).
- Positive integer (e.g.
"600"): Calculates per-resource exponential backoff (baseDelay 2^(failures-1)capped at the specified max delay) and returnsreconcile.Result{RequeueAfter: nextDelay}, nil.- Special value
"0": Halts automated error retries by recordingReady=Falsecondition and returningreconcile.Result{}, nil. No periodic drift re-enqueue is scheduled until.specis modified, metadata/annotations change, or the controller pod restarts.- Malformed / negative value: Logs parse error and falls back to default error retry behavior.
2. Lifecycle Guarantees:
- Deletion intent precedence: Resources with
deletionTimestamp != nilbypass custom backoff and retry halting, returning errors directly to controller-runtime for prompt deletion retries.- Reset on success: On successful reconciliation, failure counts are cleared (
Forget(request.NamespacedName)).- Immediate wake-up on
.specedit: Generation changes trigger immediate reconciliation through controller-runtime watch predicates.3. Tests:
- Unit tests for parser and exponential backoff limiter in
pkg/controller/ratelimiter/dynamicratelimiter_test.go.- Unit tests in
pkg/controller/direct/directbase/directbase_controller_test.goverifying"0"retry halt, positive max delay capping, malformed input fallback, success resets, and deletion bypass.- E2E scenario test in
tests/e2e/testdata/scenarios/backoff_max_delay_zero/verifying retry halt on failure and immediate recovery upon.specupdate.Fixes #13649
``
release-notecnrm.cloud.google.com/backoff-max-delay-in-secondsSupport configurable max exponential backoff delay ceiling and retry halting for direct controllers via
annotation.
``This PR was generated by the overseer** agent (powered by the gemini-3.7-flash model).