EVENT task executes twice, if asyncComplete is specified to true (2 events are sent at once)
Description of the bug
A task of the type EVENT sends 2 events at once if it has property asyncComplete is specified to true
Details Conductor version: 3.11.3
To Reproduce Example workflow:
{
"name": "testEventWF",
"description": "testEventWF",
"version": 1,
"tasks": [
{
"name": "sendEvent",
"taskReferenceName": "sendEvent",
"inputParameters": {
"value": "test"
},
"sink": "conductor:test",
"type": "EVENT",
"asyncComplete": true
}
],
"inputParameters": [],
"outputParameters": {
},
"schemaVersion": 2,
"restartable": true,
"workflowStatusListenerEnabled": false,
"ownerEmail": "[email protected]",
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0
}
Expected behavior Only one event should be sent at once
Additional context Looks like the problem is in the recursive call of method com.netflix.conductor.core.execution.WorkflowExecutor::decide(WorkflowModel) when the state of task changes. WorkflowExecutor.java#L1367
@anaken I couldn't reproduce the bug using the workflow that you posted. Does the EVENT task publish events twice every time or is it sporadic?The one in the ticket seems to be a sample, it would be helpful if you can post the original workflow. Its quite possible that this behavior only happens for a particular combination of tasks.
Hi @aravindanr , This is reproducible when we use sqs or amqp as a queue. I have to check when using conductor as queue @anaken , We are working on a fix.
Hi @anaken , PR for the fix https://github.com/Netflix/conductor/pull/3331