conductor icon indicating copy to clipboard operation
conductor copied to clipboard

Optional Task status should be COMPLETED_WITH_ERRORS

Open hebrd opened this issue 3 years ago • 3 comments

Describe the bug SUB_WORKFLOW is optional in the definition, after the sub workflow task failed, the status of the task in the parent workflow is set to FAILED.

Should it be COMPLETED_WITH_ERRORS?

Details

image image

hebrd avatar Oct 13 '22 01:10 hebrd

@BrandonDotLin yea it makes sense to mark the optional subworkflow task as COMPLETED_WITH_ERRORS. Please feel free to submit a PR for the fix.

jxu-nflx avatar Oct 17 '22 21:10 jxu-nflx

It seems my optional subworkflow does complete with COMPLETED_WITH_ERRORS when a task within the subworklow fails. My conductor version is pre-v3.10.0 so this discussion is relevant for me because I'm planning to rebuild with latest changes. I fail my subworkflow task through the event processor so I'm unsure if there's an inconsistency when things are done through the conductor client vs event queues.

pmchung avatar Oct 18 '22 17:10 pmchung

I think this issue happens if the conductor.workflow-reconciler.enabled is false or no available sweeper threads.

Since when the subworkflow fails, it also updates the parent to failed and push evaluation of parent workflow to decider queue. Without the sweep, it cannot run a decide on parent workflow to update FAILED to COMPLETED_WITH_ERRORS.

So I think the PR will create a problem with retry-able and optional subworkflow task, since if it immediately updates to completed_with_error, it will be seen as terminal and skip re-scheduling of task for retry.

pmchung avatar Oct 30 '22 05:10 pmchung