← Back to Pull requests

fix(controller): retry aborted analysis with fresh runs. Fixes #841, Fixes #2824 #5081

Open
unknown opened this pull request with 459 lines diff across 5 files
View on GitHub
unknown unknown commented on Oct 04, 2026 21:15 UTC
Author

This PR _primarily_ fixes issues related to retries following failed analysis steps.

There is an alternative version at #5080 which fixes by changing the retry patch in the kubectl plugin. That alternative would've required every client to fix the patch as well e.g. https://github.com/argoproj/argo-cd/pull/30001

The main fix here is done at the rollout controller and does not require update to kubectl extension or argocd projects.
It sets references to analysis runs nill at the rollout controller.

See #5080 for earlier commentaries and background.

This PR fixes

  • Blue/Green retries using stale results or starting analysis before readiness. (TestBlueGreenPrePromotionAnalysisRetry)

  • Canary retries re-aborting on stale analysis during scaling. (TestCanaryAnalysisRetry)

  • Combined retries bypassing preview sizing and promotion gates. (TestBlueGreenCombinedAnalysisRetry)

  • Empty pre-analysis templates blocking approved post-only retries. (TestBlueGreenPostOnlyAnalysisRetryPreservesPreviewApproval)

  • Collision handling reusing AnalysisRuns already marked for termination. (TestCreateWithCollisionCounterTerminatingRun)

  • Transient AnalysisRun lookup errors being treated as missing runs. (TestAnalysisRetryWaitsForCurrentRunLookup)
  • Fixes #841, Fixes #2824
    Updates #2897,

    Please let me know anything else that I can do/check.

    Bests

    ps. I have enabled Allow edits by maintainers, feel free to make direct changes.

    Checklist:

    [x] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
    [x] The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
    [x] I've signed my commits with DCO
    [x] My builds are green. Try syncing with master if they are not.
    [x] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
    [x] I have run all tests locally (including the flaky ones) and they pass on my workstation
    [x] I have used LLM/AI/Agent tools for this PR but I am responsible for all code of this PR
    [x] I understand what the code does and WHY/HOW it works in several scenarios
    [x] I know if my code is just adding new functionality or changing old functionality for existing users
    [x] My organization is added to USERS.md.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Summary by CodeRabbit

    Bug Fixes
    Retrying a failed or aborted rollout analysis now starts a fresh attempt while retaining the previous run for history. Stale results are less likely to interfere with retries, and BlueGreen retries preserve preview approval and promotion steps.
    Analysis lookup failures now stop reconciliation instead of being treated as though no run exists. Terminating runs are not reused for new analysis attempts.
    BlueGreen rollouts without pre-promotion analysis are handled correctly.
    Documentation
    Added Getir to the list of organizations using Argo Rollouts.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 459 lines (+344 / -115) across 5 files Reviewer: kucukaslan Review duration: 86262m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.53) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.53 · 459 lines diff across 5 files
    0.53
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.367
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #5081"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52.5% (MEDIUM) · Higher = larger blast radius
    52.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29% · Safe to merge
    29%