treblereel commented on code in PR #535:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/535#discussion_r1801861970


##########
internal/controller/sonataflow_controller.go:
##########
@@ -98,6 +100,11 @@ func (r *SonataFlowReconciler) Reconcile(ctx 
context.Context, req ctrl.Request)
                return ctrl.Result{}, err
        }
 
+       if err := r.Validate(ctx, workflow, req); err != nil {
+               klog.V(log.E).ErrorS(err, "Failed to validate SonataFlow")
+               return reconcile.Result{}, nil

Review Comment:
   @wmedvede @ricardozanini 
   
   This is quite a tricky situation: if we return the error, the deployment 
will be retried until the limit is reached. A common pattern to solve this 
problem is to return from Reconcile and log the error to the console.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to