fix: application controller avoid missing requested app operations#27133
Open
drewbailey wants to merge 1 commit intoargoproj:masterfrom
Open
fix: application controller avoid missing requested app operations#27133drewbailey wants to merge 1 commit intoargoproj:masterfrom
drewbailey wants to merge 1 commit intoargoproj:masterfrom
Conversation
Under API server pressure, an Application update that adds .operation can reach the controller at an awkward time: refresh processing may enqueue the operation queue before the informer cache reflects the new operation, and processAppOperationQueueItem() previously only performed a live GET when informer state already showed app.Operation != nil. In that case the worker could observe a stale Application, treat it as having no requested operation, and silently return. The operation would only start later if some other refresh or comparison-expiry path re-enqueued the app after informer state caught up. Address that gap by tracking explicit operation requests when an Application update transitions from operation=nil to operation!=nil, enqueueing the operation queue immediately, and allowing operation workers to do a live GET whenever that explicit request marker is present even if informer state is stale. Retry transient GET failures such as timeout, 429, or 503 instead of dropping the request. Add regression coverage for immediate operation enqueueing, recovery from stale informer state, and requeue behavior on transient live-GET failures. Signed-off-by: Drew Bailey <drew.bailey@airbnb.com>
🔴 Preview Environment stopped on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #27133 +/- ##
==========================================
+ Coverage 63.33% 63.35% +0.01%
==========================================
Files 415 415
Lines 56545 56584 +39
==========================================
+ Hits 35815 35849 +34
- Misses 17350 17355 +5
Partials 3380 3380 ☔ View full report in Codecov by Sentry. |
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.
Under API server pressure, an Application update that adds
.operationcan reach the controller at an awkward time: refresh processing may
enqueue the operation queue before the informer cache reflects the new
operation, and
processAppOperationQueueItem()previously only performeda live GET when informer state already showed
app.Operation != nil. Inthat case the worker could observe a stale Application, treat it as
having no requested operation, and silently return. The operation would
only start later if some other refresh or comparison-expiry path
re-enqueued the app after informer state caught up.
Address that gap by tracking explicit operation requests when an
Application update transitions from
operation=niltooperation!=nil,enqueueing the operation queue immediately, and allowing operation
workers to do a live GET whenever that explicit request marker is
present even if informer state is stale. Retry transient GET failures
such as timeout, 429, or 503 instead of dropping the request.
Add regression coverage for immediate operation enqueueing, recovery
from stale informer state, and requeue behavior on transient live-GET
failures.
Checklist: