ricardozanini commented on code in PR #565:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/565#discussion_r1832731858


##########
internal/controller/profiles/preview/states_preview.go:
##########
@@ -233,3 +237,44 @@ func (h *deployWithBuildWorkflowState) 
isWorkflowChanged(workflow *operatorapi.S
        }
        return false
 }
+
+func (h *deployWithBuildWorkflowState) cleanupOutdatedRevisions(ctx 
context.Context, workflow *operatorapi.SonataFlow) error {
+       if !workflow.IsKnativeDeployment() {
+               return nil
+       }
+       avail, err := knative.GetKnativeAvailability(h.Cfg)
+       if err != nil {
+               return err
+       }
+       if !avail.Serving || !avail.Eventing {
+               return nil
+       }
+       injected, err := knative.CheckKSinkInjected(workflow.Name, 
workflow.Namespace)
+       if err != nil {
+               return err
+       }
+       if !injected {
+               return fmt.Errorf("waiting for Sinkbinding K_SINK injection to 
complete")

Review Comment:
   Why are we returning an error here? Just to requeue? 



-- 
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