Skip to content

Commit

Permalink
reconciler/managed: don't brick MR on create conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
  • Loading branch information
sttts committed Jan 27, 2024
1 parent 7d7a4e9 commit 34c3e60
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/reconciler/managed/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1051,10 +1051,9 @@ func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (resu
// issue we'll be requeued implicitly when we update our status with
// the new error condition. If not, we requeue explicitly, which will trigger backoff.
log.Debug("Cannot create external resource", "error", err)
if kerrors.IsConflict(err) {
return reconcile.Result{Requeue: true}, nil
if !kerrors.IsConflict(err) {
record.Event(managed, event.Warning(reasonCannotCreate, err))
}
record.Event(managed, event.Warning(reasonCannotCreate, err))

// We handle annotations specially here because it's
// critical that they are persisted to the API server.
Expand Down

0 comments on commit 34c3e60

Please sign in to comment.