You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/22 06:42:54 UTC

[GitHub] [dolphinscheduler] jinyanhui2008 opened a new pull request, #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions #11952

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

   <!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.-->
   
   ## Purpose of the pull request
   
   <!--(For example: This pull request adds checkstyle plugin).-->
   
   ## 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)
   
   If your pull request contain incompatible change, you should also add it to `docs/docs/en/guide/upgrede/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


[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #12100:
URL: https://github.com/apache/dolphinscheduler/pull/12100#discussion_r977270859


##########
dolphinscheduler-ui/src/views/projects/task/definition/use-task.ts:
##########
@@ -88,7 +88,9 @@ export function useTask(projectCode: number) {
 
   const onEditTask = async (row: IRecord, readonly: boolean) => {
     const result = await queryTaskDefinitionByCode(row.taskCode, projectCode)
-    task.taskData = { ...result, processName: row.processDefinitionCode }
+    // debugger
+    task.taskData = {...result, processName: row.processDefinitionCode, upstreamTaskMapKey: row.upstreamTaskMapKey}
+    // task.taskData = { ...result, processName: row.processDefinitionCode }

Review Comment:
   ```suggestion
   
   ```



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java:
##########
@@ -506,28 +516,46 @@ public Map<String, Object> updateTaskWithUpstream(User loginUser, long projectCo
             ProcessTaskRelation taskRelation = upstreamTaskRelations.get(0);
             List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryByProcessCode(projectCode, taskRelation.getProcessDefinitionCode());
             List<ProcessTaskRelation> processTaskRelationList = Lists.newArrayList(processTaskRelations);
-            List<ProcessTaskRelation> relationList = Lists.newArrayList();
+//            List<ProcessTaskRelation> relationList = Lists.newArrayList();
             for (ProcessTaskRelation processTaskRelation : processTaskRelationList) {
                 if (processTaskRelation.getPostTaskCode() == taskCode) {
                     if (queryUpStreamTaskCodeMap.containsKey(processTaskRelation.getPreTaskCode()) && processTaskRelation.getPreTaskCode() != 0L) {
                         queryUpStreamTaskCodeMap.remove(processTaskRelation.getPreTaskCode());
                     } else {
                         processTaskRelation.setPreTaskCode(0L);
                         processTaskRelation.setPreTaskVersion(0);
-                        relationList.add(processTaskRelation);
+//                        relationList.add(processTaskRelation);

Review Comment:
   ```suggestion
   
   ```



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java:
##########
@@ -506,28 +516,46 @@ public Map<String, Object> updateTaskWithUpstream(User loginUser, long projectCo
             ProcessTaskRelation taskRelation = upstreamTaskRelations.get(0);
             List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryByProcessCode(projectCode, taskRelation.getProcessDefinitionCode());
             List<ProcessTaskRelation> processTaskRelationList = Lists.newArrayList(processTaskRelations);
-            List<ProcessTaskRelation> relationList = Lists.newArrayList();
+//            List<ProcessTaskRelation> relationList = Lists.newArrayList();
             for (ProcessTaskRelation processTaskRelation : processTaskRelationList) {
                 if (processTaskRelation.getPostTaskCode() == taskCode) {
                     if (queryUpStreamTaskCodeMap.containsKey(processTaskRelation.getPreTaskCode()) && processTaskRelation.getPreTaskCode() != 0L) {
                         queryUpStreamTaskCodeMap.remove(processTaskRelation.getPreTaskCode());
                     } else {
                         processTaskRelation.setPreTaskCode(0L);
                         processTaskRelation.setPreTaskVersion(0);
-                        relationList.add(processTaskRelation);
+//                        relationList.add(processTaskRelation);
                     }
                 }
             }
-            processTaskRelationList.removeAll(relationList);
+//            processTaskRelationList.removeAll(relationList);

Review Comment:
   ```suggestion
   
   ```



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java:
##########
@@ -506,28 +516,46 @@ public Map<String, Object> updateTaskWithUpstream(User loginUser, long projectCo
             ProcessTaskRelation taskRelation = upstreamTaskRelations.get(0);
             List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryByProcessCode(projectCode, taskRelation.getProcessDefinitionCode());
             List<ProcessTaskRelation> processTaskRelationList = Lists.newArrayList(processTaskRelations);
-            List<ProcessTaskRelation> relationList = Lists.newArrayList();
+//            List<ProcessTaskRelation> relationList = Lists.newArrayList();

Review Comment:
   ```suggestion
   
   ```



-- 
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


[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #12100:
URL: https://github.com/apache/dolphinscheduler/pull/12100#issuecomment-1254628043

   SonarCloud Quality Gate failed.&nbsp; &nbsp; [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=12100)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=VULNERABILITY) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=VULNERABILITY) [6 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=SECURITY_HOTSPOT) [3 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=CODE_SMELL) [246 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=CODE_SMELL)
   
   [![39.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '39.4%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_coverage&view=list) [39.4% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_coverage&view=list)  
   [![9.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '9.4%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_duplicated_lines_density&view=list) [9.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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


[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #12100:
URL: https://github.com/apache/dolphinscheduler/pull/12100#issuecomment-1254628512

   SonarCloud Quality Gate failed.&nbsp; &nbsp; [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=12100)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=VULNERABILITY) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=VULNERABILITY) [6 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=SECURITY_HOTSPOT) [3 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=CODE_SMELL) [246 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12100&resolved=false&types=CODE_SMELL)
   
   [![39.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '39.5%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_coverage&view=list) [39.5% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_coverage&view=list)  
   [![9.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '9.4%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_duplicated_lines_density&view=list) [9.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12100&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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


[GitHub] [dolphinscheduler] caishunfeng commented on pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions

Posted by GitBox <gi...@apache.org>.
caishunfeng commented on PR #12100:
URL: https://github.com/apache/dolphinscheduler/pull/12100#issuecomment-1254604953

   @jinyanhui2008 please add some description of this pr.


-- 
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


[GitHub] [dolphinscheduler] jinyanhui2008 commented on pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions

Posted by GitBox <gi...@apache.org>.
jinyanhui2008 commented on PR #12100:
URL: https://github.com/apache/dolphinscheduler/pull/12100#issuecomment-1255696951

   Repair task definition function:
   
   1. Modification of task definition may lead to loss of workflow definition and status
   
   2. Missing predecessors when modifying task definitions
   
   3. Creating and modifying task definitions will lose workflow definitions of other task definitions


-- 
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


[GitHub] [dolphinscheduler] codecov-commenter commented on pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #12100:
URL: https://github.com/apache/dolphinscheduler/pull/12100#issuecomment-1254620961

   # [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/12100?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > :exclamation: No coverage uploaded for pull request base (`3.0.1-release@b3c27ef`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   ```diff
   @@               Coverage Diff                @@
   ##             3.0.1-release   #12100   +/-   ##
   ================================================
     Coverage                 ?   39.86%           
     Complexity               ?     4580           
   ================================================
     Files                    ?      888           
     Lines                    ?    35165           
     Branches                 ?     3872           
   ================================================
     Hits                     ?    14017           
     Misses                   ?    19787           
     Partials                 ?     1361           
   ```
   
   
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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


[GitHub] [dolphinscheduler] jinyanhui2008 closed pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions

Posted by GitBox <gi...@apache.org>.
jinyanhui2008 closed pull request #12100: [Fix] [Bug] Fix bugs such as missing status and workflow when creating and modifying task definitions
URL: https://github.com/apache/dolphinscheduler/pull/12100


-- 
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