Skip to content

refactor(controller): canary reconcile pipeline with guaranteed status sync. Fixes #4626 - #4963

Draft
zachaller wants to merge 6 commits into
argoproj:masterfrom
zachaller:refactor/canary-reconcile-pipeline
Draft

refactor(controller): canary reconcile pipeline with guaranteed status sync. Fixes #4626#4963
zachaller wants to merge 6 commits into
argoproj:masterfrom
zachaller:refactor/canary-reconcile-pipeline

Conversation

@zachaller

Copy link
Copy Markdown
Collaborator

Summary

Supersedes #4962 — same #4626 fix, generalized to all canary actuation stages.

Behavior change (release note)

Rollouts stuck on a persistently failing traffic router (or other actuation stage) will now evaluate progressDeadlineAbort every reconcile and can time out / auto-abort when progressDeadlineAbort: true. Previously they could stay Progressing forever.

Test plan

Made with Cursor

Ensure syncRolloutStatusCanary always runs after actuation stages so
progressDeadline/abort evaluation cannot be skipped (argoproj#4626). Hold step
progression and stable promotion while actuation is deferred, and port
argoproj#4962's weight-verification safety for stable scale-down and promotion.

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
…nditions

Replace the per-pass actuationDeferred flag with persisted stage conditions
(TrafficRoutingApplied, ServicesReconciled, ActuationSucceeded) merged during
status sync. Progression gates read current-pass stage condition state, and
conditions are only introduced on failure or when recovering from False.

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
…eline

Introduce a stage table and executor for canary actuation with centralized
condition recording, event emission, and requeue policy. Traffic routing
errors use stageHold (status sync + verify-interval requeue); other stage
failures remain fatal with workqueue backoff.

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
@zachaller

zachaller commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Follow up work:

  1. Blue-green: apply to rolloutBlueGreen (bluegreen.go:19). Extra design needed: syncRolloutStatusBlueGreen(previewSvc, activeSvc) requires the services, and the services-fetch is the first stage — define a degraded status-sync path when it fails (e.g. sync conditions/deadline only, skip service-derived fields).
  2. Downgrade cosmetic stages: make reconcileEphemeralMetadata and reconcileRevisionHistoryLimit stageHold-like (continue the whole pipeline, not just status sync) — nothing downstream depends on them for traffic safety. One-line table change; needs its own release-note.
  3. Service-switch persistent failures: consider stageHold (not Fatal) with a ServicesReconciled gate — the strongest remaining progressDeadlineSeconds/progressDeadlineAbort silently non-functional on canary rollouts with Istio traffic routing when canary ReplicaSet is unavailable #4626-class production failure mode (admission webhook / RBAC on Services). Requires the same "skip downstream traffic routing" reasoning as fix(controller)!: do not block abort/progressDeadline on traffic routing errors. Fixes #4626 #4962; the pipeline makes this a table + skip-rule change.
  4. Unify step plugin hasError into the condition mechanism fully.
  5. Revisit the pod-restart stageStopNoStatus anomaly: should a restart-heavy pass still evaluate progressDeadline? Probably yes, but it changes deadline behavior for restart storms — needs its own analysis.

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Published E2E Test Results

  4 files    4 suites   4h 7m 28s ⏱️
150 tests 136 ✅  7 💤 7 ❌
608 runs  572 ✅ 28 💤 8 ❌

For more details on these failures, see this check.

Results for commit ea191c9.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Published Unit Test Results

2 643 tests   2 643 ✅  3m 30s ⏱️
  131 suites      0 💤
    1 files        0 ❌

Results for commit ea191c9.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.21053% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.22%. Comparing base (f2c5c2b) to head (ea191c9).

Files with missing lines Patch % Lines
rollout/stages.go 78.57% 16 Missing and 8 partials ⚠️
rollout/stageconditions.go 92.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4963      +/-   ##
==========================================
+ Coverage   85.17%   85.22%   +0.04%     
==========================================
  Files         166      168       +2     
  Lines       19453    19569     +116     
==========================================
+ Hits        16570    16677     +107     
- Misses       2030     2038       +8     
- Partials      853      854       +1     
Flag Coverage Δ
e2e 53.21% <77.77%> (+0.18%) ⬆️
unit-tests 81.66% <73.09%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…availableCanary

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
…availableCanary

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant