[Fix-18131] Workflow instance stuck in RUNNING state forever when using CONTINUE failure strategy with a failed upstream task#18146
Open
SbloodyS wants to merge 8 commits intoapache:devfrom
Open
[Fix-18131] Workflow instance stuck in RUNNING state forever when using CONTINUE failure strategy with a failed upstream task#18146SbloodyS wants to merge 8 commits intoapache:devfrom
SbloodyS wants to merge 8 commits intoapache:devfrom
Conversation
zhongjiajie
previously approved these changes
Apr 9, 2026
ruanwenjun
requested changes
Apr 9, 2026
Member
There was a problem hiding this comment.
Maybe we only need to add a new judge at AbstractWorkflowStateAction
line 90, if all triggerCandidateTasks's predecessor are inactive, and readyToTriggerTasks is empty then call emitWorkflowFinishedEventIfApplicable
protected void triggerTasks(final IWorkflowExecutionRunnable workflowExecutionRunnable,
final List<ITaskExecutionRunnable> triggerCandidateTasks) {
final IWorkflowExecutionGraph workflowExecutionGraph = workflowExecutionRunnable.getWorkflowExecutionGraph();
final List<ITaskExecutionRunnable> readyToTriggerTasks = triggerCandidateTasks
.stream()
.filter(workflowExecutionGraph::isTriggerConditionMet)
.sorted(Comparator.comparing(ITaskExecutionRunnable::getName))
.collect(Collectors.toList());
final boolean isAllCandidateTaskPredecessorFinished = triggerCandidateTasks.stream()
.flatMap(t -> workflowExecutionGraph.getPredecessors(t.getName()).stream())
.allMatch(workflowExecutionGraph::isTaskExecutionRunnableInActive);
if (CollectionUtils.isEmpty(readyToTriggerTasks)) {
if (isAllCandidateTaskPredecessorFinished) {
emitWorkflowFinishedEventIfApplicable(workflowExecutionRunnable);
}
return;
}
|
ruanwenjun
reviewed
Apr 10, 2026
| .assertThat(repository.queryWorkflowInstance(workflowInstanceId)) | ||
| .matches( | ||
| workflowInstance -> workflowInstance.getState() == WorkflowExecutionStatus.SUCCESS); | ||
| workflowInstance -> workflowInstance.getState() == WorkflowExecutionStatus.FAILURE); |
Member
There was a problem hiding this comment.
We may don't need to change this case?
Member
Author
There was a problem hiding this comment.
Yes. You are right. I reverted this.
| taskType: LogicFakeTask | ||
| taskParams: '{"localParams":null,"varPool":[],"shellScript":"echo success"}' | ||
| workerGroup: default | ||
| environmentCode: 144873539254368 |
Member
There was a problem hiding this comment.
We may don't need to change this?
Member
Author
There was a problem hiding this comment.
It will cause local execution exceptions...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Was this PR generated or assisted by AI?
Yes. IT is generated by AI.
Purpose of the pull request
fix #18131
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
Pull Request Notice
Pull Request Notice
If your pull request contains incompatible change, you should also add it to
docs/docs/en/guide/upgrade/incompatible.md