-
Notifications
You must be signed in to change notification settings - Fork 109
Description
From Ada Logics:
Proper logging is important to ensure audit trails in case of breaches. However, throughout the code we found inconsistency in the way logging is handled, and often when errors occur there would be no error logging.
The ImageAutomationReconciler declares the following failWithError function:
This function is consistently used to return from the Reconcile function in an appropriate manner with proper logging, e.g:
This is a good way of abstracting of common logic and also ensures logging However, this theme is never used in any of the other controllers and these controllers implement the logic quite differently, e.g.
Recommendation
● Standardise how logging should occur.
● Use helper methods for common error handling.
● Log whenever errors occur.
● Log differently depending on how each controller exits the Reconcile functions.