fix(templatize): reuse a retry attempt's successful deployment #8215
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.59) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 174 lines diff across 2 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.309
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #8215"
general
weight: 0.35
mmazur
When templatize polls an existing ARM deployment and finds it
FailedorCanceled, it looks for a successful retry with the same step inputs. If it finds one, it reuses the outputs without redeploying and leaves the failed deployment in Azure for inspection.Fixes AROSLSRE-2865. Supersedes #8194.
Why
With a step cache configured, templatize names ARM deployments using a digest that includes the retry attempt. If attempt 0 fails and attempt 1 succeeds, a later run with the same inputs starts at attempt 0 and can fail with a bare
DeploymentFailedthat doesn't match the step's retry rules.This issue caused about 9% of
e2e-parallel-inplace-upgraderuns to fail: 62 failures over 14 days, 61 of them at theService.Infraclusterstep. The step retried successfully after a transient Cosmos DB network security perimeter lock during provisioning, but the upgrade phase found the failed attempt for the unchanged step.What
For deployments named by their inputs, templatize lists successful deployments in the same resource group or subscription and checks the other attempt names in attempt order. It reads the first reusable attempt's outputs, caches them under the current attempt's digest, and uses the successful deployment for operation details. If it can't reuse another attempt, it returns the original failure.