Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix for test error
Signed-off-by: YuChen <[email protected]>
  • Loading branch information
YuChen committed Sep 26, 2024
commit 1d8f20aca184c8e98d723b9d113741d13b42ee03
3 changes: 3 additions & 0 deletions controllers/operandrequest/operandrequest_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Re
if reflect.DeepEqual(existingInstance.Status, requestInstance.Status) {
return
}

// Update requestInstance's resource version to avoid conflicts
requestInstance.ResourceVersion = existingInstance.ResourceVersion
if err := r.Client.Status().Patch(ctx, requestInstance, client.MergeFrom(existingInstance)); err != nil && !apierrors.IsNotFound(err) {
reconcileErr = utilerrors.NewAggregate([]error{reconcileErr, fmt.Errorf("error while patching OperandRequest.Status: %v", err)})
}
Expand Down