You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "yingh0ng (via GitHub)" <gi...@apache.org> on 2025/03/14 10:02:59 UTC
[PR] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
yingh0ng opened a new pull request, #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058
<!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! -->
## Purpose of the pull request
<!--(For example: This pull request adds checkstyle plugin).-->
Check if the WorkflowGrapth is a dag #17057
## Brief change log
<!--*(for example:)*
- *Add maven-checkstyle-plugin to root pom.xml*
-->
Conclusion: A graph is not a DAG if its task length is less than the total number of tasks after topological sorting
## Verify this pull request
<!--*(Please pick either of the following options)*-->
This change added tests and can be verified as follows:
- WorkflowGraphCheckIfDAGTest
<!--*(example:)*
- *Added dolphinscheduler-dao tests for end-to-end.*
- *Added CronUtilsTest to verify the change.*
- *Manually verified the change by testing locally.* -->
## 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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2808147583
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058) **Quality Gate passed**
Issues
 [21 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [95.7% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058)
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2724215950
Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r2131600556
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +60,62 @@ public WorkflowGraph(List<WorkflowTaskRelation> workflowTaskRelations, List<Task
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
Review Comment:
Yes, DFS can check whether a graph is a DAG. My implementation is Kahn's algorithm.
Both methods can perform DAG detection.
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r2010252849
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +59,22 @@ public WorkflowGraph(List<WorkflowTaskRelation> workflowTaskRelations, List<Task
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
+ DAG<Long, TaskDefinition, WorkflowTaskRelation> graph = new DAG<>();
Review Comment:
Please don't use `DAG`, this class will be removed in the future.
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2866030200
@ruanwenjun @SbloodyS PTAL
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2942516662
Can somebody review this again.
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r1995305777
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +60,61 @@
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
+ //If topology-sort-result`s size less than taskDefinitions`s size, then not a DAG
+ Map<Long, List<Long>> preTaskCodeMap = workflowTaskRelations
+ .stream()
+ .collect(Collectors.groupingBy(WorkflowTaskRelation::getPostTaskCode,
+ Collectors.mapping(WorkflowTaskRelation::getPreTaskCode, Collectors.toList())));
+ Map<Long, List<Long>> postTaskCodeMap = workflowTaskRelations
+ .stream()
+ .collect(Collectors.groupingBy(WorkflowTaskRelation::getPreTaskCode,
+ Collectors.mapping(WorkflowTaskRelation::getPostTaskCode, Collectors.toList())));
+
+ // build in-degree count
+ Map<Long, Integer> inDegreeCount = new HashMap<>();
+ for (TaskDefinition taskDefinition : taskDefinitions) {
+ List<Long> preTasks = preTaskCodeMap.get(taskDefinition.getCode());
+ if (preTasks == null) {
+ inDegreeCount.put(taskDefinition.getCode(), 0);
+ } else {
+ inDegreeCount.put(taskDefinition.getCode(), preTasks.size());
+ }
+ }
+
+ // Adds the task with zero-in-degree to the queue
+ Set<Long> visitTable = new HashSet<>();
+ Queue<Long> queue = new ArrayDeque<>();
+ for (Map.Entry<Long, Integer> entry : inDegreeCount.entrySet()) {
+ if (entry.getValue() == 0 && visitTable.add(entry.getKey())) {
+ queue.offer(entry.getKey());
Review Comment:
## Ignored error status of call
Method checkIfDAG ignores exceptional return value of Queue<Long>.offer.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/5159)
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +60,61 @@
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
+ //If topology-sort-result`s size less than taskDefinitions`s size, then not a DAG
+ Map<Long, List<Long>> preTaskCodeMap = workflowTaskRelations
+ .stream()
+ .collect(Collectors.groupingBy(WorkflowTaskRelation::getPostTaskCode,
+ Collectors.mapping(WorkflowTaskRelation::getPreTaskCode, Collectors.toList())));
+ Map<Long, List<Long>> postTaskCodeMap = workflowTaskRelations
+ .stream()
+ .collect(Collectors.groupingBy(WorkflowTaskRelation::getPreTaskCode,
+ Collectors.mapping(WorkflowTaskRelation::getPostTaskCode, Collectors.toList())));
+
+ // build in-degree count
+ Map<Long, Integer> inDegreeCount = new HashMap<>();
+ for (TaskDefinition taskDefinition : taskDefinitions) {
+ List<Long> preTasks = preTaskCodeMap.get(taskDefinition.getCode());
+ if (preTasks == null) {
+ inDegreeCount.put(taskDefinition.getCode(), 0);
+ } else {
+ inDegreeCount.put(taskDefinition.getCode(), preTasks.size());
+ }
+ }
+
+ // Adds the task with zero-in-degree to the queue
+ Set<Long> visitTable = new HashSet<>();
+ Queue<Long> queue = new ArrayDeque<>();
+ for (Map.Entry<Long, Integer> entry : inDegreeCount.entrySet()) {
+ if (entry.getValue() == 0 && visitTable.add(entry.getKey())) {
+ queue.offer(entry.getKey());
+ }
+ }
+
+ // topology sort
+ Set<Long> resultTable = new HashSet<>();
+ while (!queue.isEmpty()) {
+ Long taskCode = queue.poll();
+ resultTable.add(taskCode);
+
+ List<Long> postCodes = postTaskCodeMap.get(taskCode);
+ if (postCodes == null) {
+ continue;
+ }
+ for (Long postCode : postCodes) {
+ inDegreeCount.put(postCode, inDegreeCount.get(postCode) - 1);
+
+ if (inDegreeCount.get(postCode) == 0) {
+ queue.offer(postCode);
Review Comment:
## Ignored error status of call
Method checkIfDAG ignores exceptional return value of Queue<Long>.offer.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/5160)
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2739303998
@SbloodyS Hello, please take a look.
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS closed pull request #17058: [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor
URL: https://github.com/apache/dolphinscheduler/pull/17058
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2729011528
Update: When a ring exists, it is not a DAG
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2742927815
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058) **Quality Gate passed**
Issues
 [8 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058)
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-3157160363
Closing for inactivity.
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r2011154265
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +59,22 @@ public WorkflowGraph(List<WorkflowTaskRelation> workflowTaskRelations, List<Task
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
+ DAG<Long, TaskDefinition, WorkflowTaskRelation> graph = new DAG<>();
Review Comment:
つ﹏⊂
So, are there other implemented classes?
Otherwise I will implement it using my previous commit.
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2742626060
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058) **Quality Gate passed**
Issues
 [8 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058)
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2742630691
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058) **Quality Gate passed**
Issues
 [8 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058)
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2808146712
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058) **Quality Gate passed**
Issues
 [21 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [95.7% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058)
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r2020533941
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +59,22 @@ public WorkflowGraph(List<WorkflowTaskRelation> workflowTaskRelations, List<Task
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
+ DAG<Long, TaskDefinition, WorkflowTaskRelation> graph = new DAG<>();
Review Comment:
@ruanwenjun PTAL
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r2128840569
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +60,62 @@ public WorkflowGraph(List<WorkflowTaskRelation> workflowTaskRelations, List<Task
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
Review Comment:
It seems we can directly use DFS to check if this is DAG after `addTaskNodes` and `addTaskEdge`.
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2785383009
@ruanwenjun PTAL
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r2184154114
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +60,62 @@ public WorkflowGraph(List<WorkflowTaskRelation> workflowTaskRelations, List<Task
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
Review Comment:
Hey, if you have question or suggestion for this, please tell me.
--
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] [Improvement-17057][Master] Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2944997970
Please retry analysis of this Pull-Request directly on SonarQube Cloud
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#discussion_r2024963217
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraph.java:
##########
@@ -57,6 +59,22 @@ public WorkflowGraph(List<WorkflowTaskRelation> workflowTaskRelations, List<Task
addTaskEdge(workflowTaskRelations);
}
+ private void checkIfDAG(List<WorkflowTaskRelation> workflowTaskRelations, List<TaskDefinition> taskDefinitions) {
+ DAG<Long, TaskDefinition, WorkflowTaskRelation> graph = new DAG<>();
Review Comment:
`WorkflowGraph` is used to replace `DAG`
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "yingh0ng (via GitHub)" <gi...@apache.org>.
yingh0ng commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2742779381
@SbloodyS The Mergeable check failed because this PR was not added to the milestone.
--
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] [Improvement-17057][Master]Check if the WorkflowGrapth is a dag at constructor [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17058:
URL: https://github.com/apache/dolphinscheduler/pull/17058#issuecomment-2742922945
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058) **Quality Gate passed**
Issues
 [8 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17058&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17058&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17058)
--
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