jianrongzhang89 commented on code in PR #467:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/467#discussion_r1626243207


##########
controllers/profiles/preview/states_preview.go:
##########
@@ -210,7 +211,15 @@ func (h *deployWithBuildWorkflowState) Do(ctx 
context.Context, workflow *operato
        }
 
        // didn't change, business as usual
-       return NewDeploymentReconciler(h.StateSupport, 
h.ensurers).reconcileWithImage(ctx, workflow, build.Status.ImageTag)
+       result, objs, err := NewDeploymentReconciler(h.StateSupport, 
h.ensurers).reconcileWithImage(ctx, workflow, build.Status.ImageTag)
+       if err != nil {
+               workflow.Status.Manager().MarkFalse(api.DeployedConditionType, 
api.DeploymentFailureReason, fmt.Sprintf("Error in deploy the workflow:%s", 
err))
+               _, err = h.PerformStatusUpdate(ctx, workflow)
+               return result, nil, err
+       }
+       workflow.Status.Manager().MarkTrue(api.DeployedConditionType)

Review Comment:
   Sounds good to me. Updated.



##########
controllers/profiles/dev/profile_dev_test.go:
##########
@@ -391,6 +404,7 @@ func Test_VolumeWithCapitalizedPaths(t *testing.T) {
        workflow := 
test.GetSonataFlow(test.SonataFlowGreetingsWithStaticResourcesCR, t.Name())
 
        client := 
test.NewSonataFlowClientBuilder().WithRuntimeObjects(workflow, 
configMap).WithStatusSubresource(workflow, configMap).Build()
+       knative.SetDisvoveryClient(test.CreateFakeKnativeDiscoveryClient())

Review Comment:
   Done



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