Skip to content

Suppress result when updating status#609

Merged
scothis merged 1 commit intoreconcilerio:mainfrom
scothis:status-update-no-requeue
Mar 27, 2025
Merged

Suppress result when updating status#609
scothis merged 1 commit intoreconcilerio:mainfrom
scothis:status-update-no-requeue

Conversation

@scothis
Copy link
Member

@scothis scothis commented Mar 27, 2025

Updating the status for a resource will propagated from the api server back to the informer causing the resource be added to the queue. Directly requesting a requeue is counter productive because we may end up reprocessing the now stale resource. Worse, requeues will extend the work queue backoff while it should be reset.

We now always return an empty result after updating the status. The resource is reprocessed organically.

ErrSkipStatusUpdate allows a sub reconciler to opt out of the status update even if the value has changed. As an error, the request is requeued automatically.

Updating the status for a resource will propagated from the api server
back to the informer causing the resource be added to the queue.
Directly requesting a requeue is counter productive because we may end
up reprocessing the now stale resource. Worse, requeues will extend the
work queue backoff while it should be reset.

We now always return an empty result after updating the status. The
resource is reprocessed organically.

ErrSkipStatusUpdate allows a sub reconciler to opt out of the status
update even if the value has changed. As an error, the request is
requeued automatically.

Signed-off-by: Scott Andrews <scott@andrews.me>
@scothis scothis requested a review from mamachanko March 27, 2025 15:51
@codecov
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.43%. Comparing base (4f11fa3) to head (8c0d3cb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #609   +/-   ##
=======================================
  Coverage   59.42%   59.43%           
=======================================
  Files          36       36           
  Lines        4101     4102    +1     
=======================================
+ Hits         2437     2438    +1     
  Misses       1566     1566           
  Partials       98       98           

☔ View full report in Codecov by Sentry.
📢 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.

@scothis scothis merged commit dc63cbb into reconcilerio:main Mar 27, 2025
4 checks passed
@scothis scothis deleted the status-update-no-requeue branch March 27, 2025 17:43
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.

2 participants