ricardozanini opened a new issue, #3016: URL: https://github.com/apache/incubator-kie-tools/issues/3016
## Summary In a nutshell, once a given `SonataFlowBuild` is manually edited by the user, the controller should kick a new build automatically without relying on the annotation as outlined here: https://sonataflow.org/serverlessworkflow/latest/cloud/operator/build-and-deploy-workflows.html#_restarting_a_build ## Original Reference Note that the SonataFlowBuild is created by the recon cycle, so I think potential changes here might be overridden at any moment? I wasn't here at the time the build process was designed, maybe it's not overridden by design, and if a build exists, that build will be picked-up intentionally (see Use case 2 below), IDK this part, or maybe it can be overridden in the future. **Use case 1:** 1. created a SonataFlow 2. I let the regular build to finish 3. I have got locally the automatically generated SonataFlowBuild. 4. I have modified that SonataFlowBuild ``` apiVersion: sonataflow.org/v1alpha08 kind: SonataFlowBuild metadata: name: greet2 namespace: test spec: envs: - name: MAVEN_MIRROR_URL value: http://my.company.registry.local ``` I have applied the modification, oc apply -f the_build.yaml With the following results: 1. No new build is started 2. If I start a new build using the existing OpenShift BuildConfig 3. The modifications in the SFB are not picked up, since the OpenShift BuildConfig was generated before. So in this flow, the modifications are not picked-up **Use Case 2:** 1. I create the modifyed my_build.yaml **before deploying** the SonataFlow, since we know what the generated SonataFlowBuild name will be. ``` apiVersion: sonataflow.org/v1alpha08 kind: SonataFlowBuild metadata: name: greet2 namespace: test spec: envs: - name: MAVEN_MIRROR_URL value: http://my.company.registry.local ``` In the operator logs we can see these errors: `E0314 09:55:57.361511 1 controller.go:316] "msg"="Reconciler error" "error"="SonataFlow.sonataflow.org \"greet2\" not found" "SonataFlowBuild"={"name":"greet2","namespace":"test"} "controller"="sonataflowbuild" "controllerGroup"="sonataflow.org" "controllerKind"="SonataFlowBuild" "logger"="sonataflow-manager" "name"="greet2" "namespace"="test" "reconcileID"="0185c1b2-974f-4d5d-ab93-d2ef969afc46"` and of course, no OpenShift build is created, etc. 2) ok, now we deploy the SonataFlow. But no build is started immediately. We can see the workflow status like this: ``` NAME PROFILE VERSION URL READY REASON apiVersion: sonataflow.org/v1alpha08 greet2 preview 1.0 False WaitingForBuild ``` 3) After some time, on new recon cycle it looks like the like the existing build is picked up, and an OpenShit build starts. In the build logs we can see:  So, it looks like the mirror configuration was picked up. In that particular configuration build won't work well, I'm using a fake mirror, but it in the presence of a real mirror, it's expected that the build will finish successfully. **Open questions:** IDK if this existing SonataFlowBuild is potentially merged with build template configurations that could exist in the existing SonataFlowPlatform if any? (if an existing SFB has precedence I'd expect that no) **Conclusion:** If the existing build is picked-up by design and not overridden, I'd suggest explaining a bit more detailed the sequence on how to make "Use case 2" work. "Use case 1" is not working, if it's expected to do, will definitively need some love. _Originally posted by @wmedvede in https://github.com/apache/incubator-kie-kogito-docs/pull/710#discussion_r1995304789_ -- 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]
