Skip to content

fix: return finalizer readiness errors#1939

Merged
aryan9600 merged 1 commit into
fluxcd:mainfrom
immanuwell:fix/finalizer-readiness-errors
Jul 2, 2026
Merged

fix: return finalizer readiness errors#1939
aryan9600 merged 1 commit into
fluxcd:mainfrom
immanuwell:fix/finalizer-readiness-errors

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

Related: #1550, #1562

retry.OnError(...) was already used in the finalizer readiness check, but the returned error got dropped. If the target Deployment hits ProgressDeadlineExceeded, finalization still keeps going anyway, kinda rough.

This stores that error and stops finalization until the target is ready. Added a regression test for the stuck Deployment case.

Repro

  1. Create a Canary with revertOnDeletion: true.
  2. Delete it while the target Deployment reports Progressing=False and Reason=ProgressDeadlineExceeded.
  3. On main, finalize() returns nil and finalization completes.
  4. With this patch, Flagger returns canary not ready during finalizing and retries later.

Tested with go test ./....

Signed-off-by: immanuwell <pchpr.00@list.ru>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 29.99%. Comparing base (61582f7) to head (2663b97).
⚠️ Report is 10 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1939      +/-   ##
==========================================
- Coverage   30.00%   29.99%   -0.01%     
==========================================
  Files         288      288              
  Lines       18455    18614     +159     
==========================================
+ Hits         5537     5584      +47     
- Misses      12189    12295     +106     
- Partials      729      735       +6     

☔ 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.

@aryan9600
aryan9600 merged commit bdd102b into fluxcd:main Jul 2, 2026
18 checks passed
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.

3 participants