Skip to content

Commit

Permalink
Merge pull request #217 from gibizer/remove-double-update
Browse files Browse the repository at this point in the history
TransportURL: rely on PatchInstance instead of manual Update
  • Loading branch information
openshift-merge-bot[bot] committed Apr 26, 2024
2 parents 3266115 + 77fda22 commit ba41f87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controllers/rabbitmq/transporturl_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,8 @@ func (r *TransportURLReconciler) Reconcile(ctx context.Context, req ctrl.Request
instance.Status.ObservedGeneration = instance.Generation

if isNewInstance {
// Register overall status immediately to have an early feedback e.g. in the cli
if err := r.Status().Update(ctx, instance); err != nil {
return ctrl.Result{}, err
}
// Return to register overall status immediately to have an early feedback e.g. in the cli
return ctrl.Result{}, nil
}

return r.reconcileNormal(ctx, instance, helper)
Expand Down

0 comments on commit ba41f87

Please sign in to comment.