THREESCALE-14654 Fix status reconciler requeue logic#1177
Open
urbanikb wants to merge 1 commit into3scale:masterfrom
Open
THREESCALE-14654 Fix status reconciler requeue logic#1177urbanikb wants to merge 1 commit into3scale:masterfrom
urbanikb wants to merge 1 commit into3scale:masterfrom
Conversation
Contributor
|
/retest |
…us write Two issues in the previous requeue logic: 1. The guard `equalStatus && newAvailable` caused the unavailable-but-equal case to fall through to a status write even when nothing had changed, producing a no-op write on every reconcile while the instance remained unavailable. The new `if equalStatus` guard short-circuits both the available and unavailable steady states, avoiding the unnecessary write. 2. Both unavailable return paths used `Requeue: true` (immediate requeue), which causes tight-loop reconciliation against an instance that is still unavailable. Switching to `RequeueAfter: 30s` gives components time to recover between checks and avoids extending backoff counter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1177 +/- ##
==========================================
+ Coverage 41.84% 43.98% +2.13%
==========================================
Files 203 204 +1
Lines 20859 20927 +68
==========================================
+ Hits 8729 9205 +476
+ Misses 11350 10920 -430
- Partials 780 802 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes https://issues.redhat.com/browse/THREESCALE-14654
Summary
equalStatus && newAvailableguard: the unavailable-but-equal case fell through to a no-op status write on every reconcile. Changed toif equalStatuswhich short-circuits both available and unavailable steady states.Requeue: true(immediate tight-loop) toRequeueAfter: 30s, giving components time to recover between checks and avoiding extending the backoff counter.Test plan
go test ./controllers/apps/... -run TestAPIManagerStatusReconcilerTestAPIManagerStatusReconciler_Reconcile_requeueAfterWhenUnavailableverifies RequeueAfter is non-zero on True→False transition🤖 Generated with Claude Code