tchughesiv commented on code in PR #415:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/415#discussion_r1520080448
##########
controllers/platform/services/properties.go:
##########
@@ -185,19 +186,21 @@ func GenerateDataIndexWorkflowProperties(workflow
*operatorapi.SonataFlow, platf
// Never nil.
func GenerateJobServiceWorkflowProperties(workflow *operatorapi.SonataFlow,
platform *operatorapi.SonataFlowPlatform) (*properties.Properties, error) {
props := properties.NewProperties()
- props.Set(constants.JobServiceRequestEventsConnector,
constants.QuarkusHTTP)
- props.Set(constants.JobServiceRequestEventsURL,
fmt.Sprintf("%s://localhost/v2/jobs/events", constants.JobServiceURLProtocol))
js := NewJobServiceHandler(platform)
- if workflow != nil && !profiles.IsDevProfile(workflow) &&
js.IsServiceEnabled() {
- if workflowdef.HasTimeouts(workflow) {
- props.Set(constants.KogitoJobServiceHealthCheckEnabled,
"true")
- }
- p, err := js.GenerateWorkflowProperties()
- if err != nil {
- return nil, err
+ if !profiles.IsDevProfile(workflow) && workflow != nil &&
workflow.Status.Services != nil && workflow.Status.Services.JobServiceRef !=
nil {
+ serviceBaseUrl := workflow.Status.Services.JobServiceRef.Url
Review Comment:
its important to keep in mind that, workflows are re-reconciled anytime a
related platform object is changed -
https://github.com/apache/incubator-kie-kogito-serverless-operator/blob/fff6361bde07b566a22bc24ec7be84506e7b98ae/controllers/sonataflow_controller.go#L174-L181
this ensures that service-related changes at the platform level will result
in a workflow.status change... which will result in a configmap change and
workflow pod restart. this has all been thoroughly tested.
--
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]