-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle CARM errors and requeues (#140)
Prior to this patch we introduced new mechanisms to handle Role ARN retrievals from the CARM cache. Which improved ACK runtime scaling capabilities and addressed possible race condition scenarios. However in the process we missed two things: - Setting an `ACK.ResourceSynced` condition stating that the resource isn't synced, yet. - Returning the **correct** runtime error that will cause the reconciller to requeue every 15seconds. Both of the problems stemmed from the fact that we're not "yet" in the reconcile function (`rm.Sync`) that is wrapped by a proper error handler (that triggers requeues, and resets/sets resource conditions). In this special case, we need to manually inject the condition and return a controller-runtime error that will trigger a requeue after 15seconds. While this is a "fair" fix, we're planning on refactoring a lot of the runtime logic to make easier to read, maintain and more importantly expose reusable component that will help avoid falling into such traps. Signed-off-by: Amine Hilaly <[email protected]> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
3 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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