Skip to content

fix(controller): decouple workloadRef scaleDown from promoteStable. Fixes #4681#4682

Open
joaquinhuigomez wants to merge 1 commit intoargoproj:masterfrom
joaquinhuigomez:fix/bluegreen-workloadref-scaledown-onsuccess
Open

fix(controller): decouple workloadRef scaleDown from promoteStable. Fixes #4681#4682
joaquinhuigomez wants to merge 1 commit intoargoproj:masterfrom
joaquinhuigomez:fix/bluegreen-workloadref-scaledown-onsuccess

Conversation

@joaquinhuigomez
Copy link
Copy Markdown

Checklist:

  • 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.
  • 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".
  • I've signed my commits with DCO
  • My builds are green. Try syncing with master if they are not.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • I have run all tests locally (including the flaky ones) and they pass on my workstation
  • I have used LLM/AI/Agent tools for this PR but I am responsible for all code of this PR
  • I understand what the code does and WHY/HOW it works in several scenarios
  • I know if my code is just adding new functionality or changing old functionality for existing users
  • My organization is added to USERS.md.

Moves the workloadRef scaleDown logic out of promoteStable() into a standalone scaleDownWorkloadRef() that runs after calculateRolloutConditions computes the phase. This fixes two interacting bugs where blue-green rollouts with postPromotionAnalysis and workloadRef.scaleDown: onsuccess never scale down the referenced Deployment: the initial deploy bypasses PostPromotionAnalysis creating a permanent dead state in shouldFullPromote, and the hardcoded revision == 1 guard prevents scaleDown on any subsequent revision.

…ixes argoproj#4681

Move workloadRef scaleDown logic out of promoteStable() into a separate
scaleDownWorkloadRef() check that runs after calculateRolloutConditions
computes the phase. This fixes two interacting bugs: the initial deploy
bypassing PostPromotionAnalysis creating a permanent dead state, and the
hardcoded revision==1 guard preventing scaleDown on subsequent revisions.

Signed-off-by: Joaquin Hui Gomez <132194176+joaquinhuigomez@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Published E2E Test Results

  4 files    4 suites   4h 36m 7s ⏱️
120 tests 103 ✅  7 💤 10 ❌
530 runs  444 ✅ 28 💤 58 ❌

For more details on these failures, see this check.

Results for commit 07a20a3.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Published Unit Test Results

2 443 tests   2 443 ✅  3m 20s ⏱️
  129 suites      0 💤
    1 files        0 ❌

Results for commit 07a20a3.

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