Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [WorkflowExecutionGraph] isTaskFinish method is not working correctly. #16990

Closed
3 tasks done
reele opened this issue Jan 30, 2025 · 1 comment · Fixed by #16995
Closed
3 tasks done

[Bug] [WorkflowExecutionGraph] isTaskFinish method is not working correctly. #16990

reele opened this issue Jan 30, 2025 · 1 comment · Fixed by #16995
Assignees
Labels
backend bug Something isn't working priority:high
Milestone

Comments

@reele
Copy link
Contributor

reele commented Jan 30, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

private boolean isTaskFinish(final ITaskExecutionRunnable taskExecutionRunnable) {
return !activeTaskExecutionRunnable.contains(taskExecutionRunnable.getName());
}

public boolean isTriggerConditionMet(final ITaskExecutionRunnable taskExecutionRunnable) {
return getPredecessors(taskExecutionRunnable.getName())
.stream()
.allMatch(predecessor -> isTaskFinish(predecessor)
&& !isTaskFailure(predecessor)
&& !isTaskPaused(predecessor)
&& !isTaskKilled(predecessor));
}

when a task was never executed, it won't be found in activeTaskExecutionRunnable/failureTaskChains/pausedTaskChains/killedTaskChains.
isTaskFinish may return a wrong result:

Image

I think there need to mark completed tasks in an explicit manner.

What you expected to happen

...

How to reproduce

set tasks in dag:
a -> b
b -> d
c -> d

when b never executed and c was finished, d will be executed.

Anything else

No response

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@reele reele added bug Something isn't working Waiting for reply Waiting for reply labels Jan 30, 2025
@SbloodyS SbloodyS added backend and removed Waiting for reply Waiting for reply labels Feb 2, 2025
@ruanwenjun
Copy link
Member

Good catch, we need to recursively judge whether its parents is in active list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working priority:high
Projects
None yet
3 participants