Skip to content

Commit

Permalink
status: omit conflict errors (PROJQUAY-2610)
Browse files Browse the repository at this point in the history
These errors happen because we have two concurrent reconcilers operating
with the same resource. This is a design fault that need to be addressed
in the future. This PR omits conflict errors during status updates as
these are constantly retried.
  • Loading branch information
ricardomaraschini committed Sep 30, 2021
1 parent b9b91c0 commit c0292e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/quay/quayregistry_status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ func (q *QuayRegistryStatusReconciler) Reconcile(

reg.Status.UnhealthyComponents = uc
if err := q.Client.Status().Update(ctx, &reg); err != nil {
if errors.IsConflict(err) {
log.Info("skipping status reconcile due to conflict, will retry")
return reschedule, nil
}
log.Error(err, "unexpected error updating component conditions")
return reschedule, nil
}
Expand Down

0 comments on commit c0292e9

Please sign in to comment.