You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "det101 (via GitHub)" <gi...@apache.org> on 2025/09/25 02:00:25 UTC

[PR] Fix the issue where the workflow cannot finish in TASK_ONLY mode. [dolphinscheduler]

det101 opened a new pull request, #17541:
URL: https://github.com/apache/dolphinscheduler/pull/17541

   <!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! -->
   
   ## Purpose of the pull request
   
   fix #17530 
   
   ## Brief change log
   
   <!--*(for example:)*
   - *Add maven-checkstyle-plugin to root pom.xml*
   -->
   
   ## Verify this pull request
   
   <!--*(Please pick either of the following options)*-->
   
   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:
   
   <!--*(example:)*
   - *Added dolphinscheduler-dao tests for end-to-end.*
   - *Added CronUtilsTest to verify the change.*
   - *Manually verified the change by testing locally.* -->
   
   (or)
   
   ## Pull Request Notice
   [Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
   
   If your pull request contains incompatible change, you should also add it to `docs/docs/en/guide/upgrade/incompatible.md`
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17530][Master] Fix the issue where the workflow cannot finish in TASK_ONLY mode. [dolphinscheduler]

Posted by "det101 (via GitHub)" <gi...@apache.org>.
det101 commented on code in PR #17541:
URL: https://github.com/apache/dolphinscheduler/pull/17541#discussion_r2384454316


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraphTopologyLogicalVisitor.java:
##########
@@ -143,7 +143,11 @@ private void doVisitationInSubGraph(Set<String> subGraphNodes) {
             if (!visitedTaskCodes.contains(taskName)) {
                 visitedTaskCodes.add(taskName); // Record the nodes
                 final Set<String> successors = workflowGraph.getSuccessors(taskName);
-                if (subGraphNodes.contains(taskName)) {
+                // In TASK_ONLY mode, pass empty successors since there are no subsequent nodes
+                if (taskDependType == TaskDependType.TASK_ONLY) {
+                    final Set<String> emptySuccessors = new HashSet<>();
+                    visitFunction.accept(taskName, emptySuccessors);
+                } else {

Review Comment:
   The code merge error has been replied, please ignore it



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17530][Master] Fix the issue where the workflow cannot finish in TASK_ONLY mode. [dolphinscheduler]

Posted by "det101 (via GitHub)" <gi...@apache.org>.
det101 closed pull request #17541: [Fix-17530][Master] Fix the issue where the workflow cannot finish in TASK_ONLY mode.
URL: https://github.com/apache/dolphinscheduler/pull/17541


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17530][Master] Fix the issue where the workflow cannot finish in TASK_ONLY mode. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #17541:
URL: https://github.com/apache/dolphinscheduler/pull/17541#discussion_r2379083060


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraphTopologyLogicalVisitor.java:
##########
@@ -143,7 +143,11 @@ private void doVisitationInSubGraph(Set<String> subGraphNodes) {
             if (!visitedTaskCodes.contains(taskName)) {
                 visitedTaskCodes.add(taskName); // Record the nodes
                 final Set<String> successors = workflowGraph.getSuccessors(taskName);
-                if (subGraphNodes.contains(taskName)) {
+                // In TASK_ONLY mode, pass empty successors since there are no subsequent nodes
+                if (taskDependType == TaskDependType.TASK_ONLY) {
+                    final Set<String> emptySuccessors = new HashSet<>();
+                    visitFunction.accept(taskName, emptySuccessors);
+                } else {

Review Comment:
   The `subGraphNodes` should be only one node in this case, so only node in `subGraphNodes` will be visit, is this bug caused by here?



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix-17530][Master] Fix the issue where the workflow cannot finish in TASK_ONLY mode. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on PR #17541:
URL: https://github.com/apache/dolphinscheduler/pull/17541#issuecomment-3334079032

   I debug with this case, this is caused by the taskDependentType has not been overwritten by command.
   Please refrain from submitting pull requests like this casually, as it will diminish the community's trust in you.
   <img width="1461" height="975" alt="image" src="https://github.com/user-attachments/assets/716d3a6a-e894-4b64-bbb1-97012145b1e7" />
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org