Infinite loop on certain misconfiguration #50
Labels
Container
Issues or pull requests relevant for Team 2: Container Infra and Tooling
needs refinement
User stories that need to be refined for further progress
/kind bug
What steps did you take and what happened:
If the Github client is misconfigured, e.g. by a secret that is not working, the operator correctly sets a condition that can be used for the user to debug. However, it also returns an error, which means that the operator reconciles immediately again. As nothing has changed, it will run into the same issue again.
What did you expect to happen:
There is no need to return the error, as the user checks the conditions stored in the status of the object rather than potential error logs. Even if a log should be produced, it should happen only once the first time the error occurs. Instead of returning the error, we can return nil and don't run into an endless loop.
Anything else you would like to add:
This pattern might exist somewhere else as well and should be always addressed in the same way: setting the condition appropriately and returning nil.
The text was updated successfully, but these errors were encountered: