OCPBUGS-130459: prevent cached annotation races in deployment controller #463
All Vouch review confidence checks passed
Residual risk 0.46 = Change Risk (0.77) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.77 · 482 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.370
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.077
Real PR Conversation Timeline
1 comments
"Review active on #463"
general
weight: 0.35
atiratree
This pull request was generated by the Product Reliability Agent. To help us improve product stability and CI, please focus review on functional correctness and material concerns. The agent will automatically address feedback, but we’d appreciate keeping non-blocking nits from delaying an otherwise correct PR. Within a week, please merge, provide blocking feedback, or close the PR with a reason.
Motivation
An intermittent
fatal error: concurrent map read and map writeinopenshift-controller-managerwas traced throughlibrary-go/pkg/apps/appsutil.AnnotationForwhile reconciling deployment configurations. The crash interrupted controller work and caused downstream test failures while the controller recovered.The underlying defect was a deployment controller mutating annotations on a ReplicationController obtained from an informer cache. That shared map could be read concurrently by another controller. The affected failure was recorded against OCPBUGS-130459.
Changes
Evidence
The original failure was observed in the rejected
5.1.0-0.nightly-2026-10-09-053625payload. Representative failed CI runs:Validation
go test -mod=vendor -race ./pkg/apps/deployer -run '^TestHandle_(cancelledDeploymentSucceeded|cleanupPostNew|cancelNew|cleanupNewWithDeployers)$' -count=1go test -mod=vendor -race ./pkg/apps/deployer ./pkg/apps/deploymentconfigGOFLAGS='-tags=containers_image_openpgp' make buildgit diff --checkThe focused race tests, affected package race tests, tagged build, formatting, and diff checks passed. The ordinary untagged build could not run in the workspace because the system
gpgmedevelopment package was unavailable.Only
pkg/apps/deployer/deployer_controller.goandpkg/apps/deployer/deployer_controller_test.gochanged;go.mod,go.sum, andvendor/remain unchanged.---
AI-generated. Review for accuracy.
@stbenjam requested from Slack
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Cancelled deployments whose deployer finishes successfully now remain Failed, with cancellation metadata preserved.
Unrelated succeeded pods no longer affect deployment status or get deleted as related deployer pods; related hook pods are cleaned up.
Deployer and hook pods are cleaned up when a deployment is Failed and its deployer has succeeded.
* A completed deployer no longer causes a new deployment to be incorrectly marked as timed out.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->