reele opened a new issue, #17354: URL: https://github.com/apache/dolphinscheduler/issues/17354
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened when a task was auto killed by timeout strategy, `WorkflowRunningStateAction.emitWorkflowFinishedEventIfApplicable` should check if there is no failed task and only exist killed or succeed tasks to finish the workflow. ``` [WI-4882819][TI-0] - 2025-07-21 00:36:01.313 INFO [ds-workflow-eventbus-worker-15] o.a.d.s.m.e.t.l.h.TaskTimeoutLifecycleEventHandler:[71] - The task Task-Of-A TimeoutStrategy is FAILED, try to publish a kill event. [WI-4882819][TI-0] - 2025-07-21 00:36:01.313 INFO [ds-workflow-eventbus-worker-15] o.a.d.s.m.e.WorkflowEventBus:[41] - Publish event: TaskKillLifecycleEvent{task=Task-Of-A, delayTime=0} ``` ``` [WI-4882819][TI-0] - 2025-07-21 06:15:18.149 ERROR [ds-workflow-eventbus-worker-12] o.a.d.s.m.e.WorkflowEventBusFireWorker:[88] - Fire event failed for WorkflowExecuteRunnable: WORKFLOW-A-20250721003500325 org.apache.dolphinscheduler.server.master.engine.exceptions.WorkflowEventFireException: Failed to fire event: WorkflowTopologyLogicalTransitionWithTaskFinishLifecycleEvent{task=[xlsx]1104_reporttaskState=SUCCESS} at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleWorkflowEventBus(WorkflowEventBusFireWorker.java:133) at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.fireAllRegisteredEvent(WorkflowEventBusFireWorker.java:86) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: The workflow: WORKFLOW-A-20250721003500325 state is RUNNING_EXECUTION can only finish with success/failed but exist task which state is not success and failure at org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.WorkflowRunningStateAction.emitWorkflowFinishedEventIfApplicable(WorkflowRunningStateAction.java:151) at org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.AbstractWorkflowStateAction.tryToTriggerSuccessorsAfterTaskFinish(AbstractWorkflowStateAction.java:126) at org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.WorkflowRunningStateAction.topologyLogicalTransitionEventAction(WorkflowRunningStateAction.java:56) at org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler.WorkflowTopologyLogicalTransitionWithTaskFinishLifecycleEventHandler.handle(WorkflowTopologyLogicalTransitionWithTaskFinishLifecycleEventHandler.java:38) at org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler.WorkflowTopologyLogicalTransitionWithTaskFinishLifecycleEventHandler.handle(WorkflowTopologyLogicalTransitionWithTaskFinishLifecycleEventHandler.java:28) at org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler.AbstractWorkflowLifecycleEventHandler.handle(AbstractWorkflowLifecycleEventHandler.java:51) at org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler.AbstractWorkflowLifecycleEventHandler.handle(AbstractWorkflowLifecycleEventHandler.java:35) at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleEvent(WorkflowEventBusFireWorker.java:144) at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleWorkflowEventBus(WorkflowEventBusFireWorker.java:122) ... 8 common frames omitted ``` ### What you expected to happen - ### How to reproduce set one timeout failure on workflow, and wait for timeout. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
