conductor-oss/conductor

Bug: Terminated Workflows Display In-Progress Tasks Due to Failed Task Archiving, Blocking Task Cancellation Logic

Closed this issue · 0 comments

Describe the bug
There is an issue where, upon using the workflow event listener to archive workflows upon completion or termination, a terminated workflow instance occasionally displays a task in progress on the Conductor UI. Tracing the logs reveals that the WorkflowExecutor::terminateWorkflow function call failed, resulting in an exception that prevents further logic from executing, including the cancellation of non-terminal tasks for that workflow instance.

Details
Conductor version: 3.13.5
Persistence implementation: Cassandra, Postgres, MySQL, Dynomite etc: Redis
Queue implementation: Postgres, MySQL, Dynoqueues etc: orkes-queue
Lock: Redis or Zookeeper? Redis
Workflow definition:
Task definition:
Event handler definition:

To Reproduce
Steps to reproduce the behavior:

  1. enable workflow status listener and use archive type
conductor.workflow-status-listener.type=archive
  1. Terminate a running workflow execution from the UI.
  2. Observe that the workflow is marked as terminated, yet the last task in the execution sequence remains in progress.

Expected behavior
Upon termination, the final task in the execution sequence should be canceled, ensuring no tasks are left in progress.