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 2020/06/03 04:02:16 UTC
[GitHub] [incubator-dolphinscheduler] zixi0825 opened a new pull request #2884: batch copy or move process #2753
zixi0825 opened a new pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884
## What is the purpose of the pull request
This pull request adds batch copy or move process feature backend code #2753
## Brief change log
## Verify this pull request
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r442614717
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
Review comment:
problem fixed
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject = projectMapper.queryByName(targetProjectName);
Review comment:
problem fixed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-645955317
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/12c249ab47efb895ea04f14862f553f2555c9024&el=desc) will **decrease** coverage by `0.09%`.
> The diff coverage is `58.13%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
- Coverage 37.19% 37.10% -0.10%
- Complexity 2559 2563 +4
============================================
Files 435 435
Lines 20020 20096 +76
Branches 2426 2438 +12
============================================
+ Hits 7447 7457 +10
- Misses 11907 11961 +54
- Partials 666 678 +12
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.77% <52.23%> (-1.10%)` | `84.00 <8.00> (+9.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `71.25% <100.00%> (-0.36%)` | `17.00 <2.00> (+1.00)` | :arrow_down: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [.../server/worker/processor/TaskExecuteProcessor.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL3dvcmtlci9wcm9jZXNzb3IvVGFza0V4ZWN1dGVQcm9jZXNzb3IuamF2YQ==) | `10.16% <0.00%> (-27.12%)` | `1.00% <0.00%> (-2.00%)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `68.25% <0.00%> (-6.35%)` | `13.00% <0.00%> (-1.00%)` | |
| [...nscheduler/server/entity/TaskExecutionContext.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL2VudGl0eS9UYXNrRXhlY3V0aW9uQ29udGV4dC5qYXZh) | `81.18% <0.00%> (-5.95%)` | `57.00% <0.00%> (-3.00%)` | |
| [...e/dolphinscheduler/remote/NettyRemotingClient.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL05ldHR5UmVtb3RpbmdDbGllbnQuamF2YQ==) | `51.07% <0.00%> (-2.88%)` | `9.00% <0.00%> (-2.00%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [12c249a...2b71e4e](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] gabrywu commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
gabrywu commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-643620139
@zixi0825 I think Rubik-W has already gave some good suggestions, can you reply to him ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648770856
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.9% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] samz406 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
samz406 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444686335
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, processDefinitionIds);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ Project targetProject = projectMapper.queryDetailById(targetProjectId);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectId);
+ return result;
+ }
+
+ if(!(targetProject.getName()).equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProject.getName());
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProject, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProject, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(projectName,targetProject.getName(),result, failedIdList,isCopy);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) moveProcessDefinitionResult.get(Constants.MSG));
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) copyProcessDefinitionResult.get(Constants.MSG));
Review comment:
I have two questions:
1 Follow your current design. There may be a splicing return. Part of the error description and part of the id situation are not clear.
2 I think that the id should not be returned here, the process name should be returned, and the front end should be prompted, which of the several process errors is ok. If the id is returned, the front-end operator does not understand which process problem these id refers to
我有两点疑问,
1 按照你现在设计。有可能会出现拼接返回 一部分是错误描述,一部分是id情况 ,这样描述不清晰了。
2 我觉得这里不应该返回id,应该返回流程名称。给前端提示,哪个几个流程错误就ok了,如果返回id,前端操作人员也不理解这些id指的是哪个流程问题。你觉得了
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/8f8ddae03098b60f0c4f1637c1e3b5670df18b70&el=desc) will **increase** coverage by `0.00%`.
> The diff coverage is `56.79%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
=========================================
Coverage 37.21% 37.22%
- Complexity 2560 2567 +7
=========================================
Files 435 435
Lines 20020 20091 +71
Branches 2426 2440 +14
=========================================
+ Hits 7451 7479 +28
- Misses 11904 11934 +30
- Partials 665 678 +13
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.54% <49.20%> (-1.33%)` | `82.00 <3.00> (+7.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `71.25% <100.00%> (-0.36%)` | `17.00 <2.00> (+1.00)` | :arrow_down: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [...he/dolphinscheduler/api/service/LoggerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTG9nZ2VyU2VydmljZS5qYXZh) | `82.60% <0.00%> (-8.70%)` | `9.00% <0.00%> (-1.00%)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `74.60% <0.00%> (-3.18%)` | `14.00% <0.00%> (ø%)` | |
| [...e/dolphinscheduler/remote/NettyRemotingClient.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL05ldHR5UmVtb3RpbmdDbGllbnQuamF2YQ==) | `51.07% <0.00%> (-2.88%)` | `9.00% <0.00%> (-2.00%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [8f8ddae...55a21cd](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/8f8ddae03098b60f0c4f1637c1e3b5670df18b70&el=desc) will **increase** coverage by `0.00%`.
> The diff coverage is `56.79%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
=========================================
Coverage 37.21% 37.22%
- Complexity 2560 2567 +7
=========================================
Files 435 435
Lines 20020 20091 +71
Branches 2426 2440 +14
=========================================
+ Hits 7451 7479 +28
- Misses 11904 11934 +30
- Partials 665 678 +13
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.54% <49.20%> (-1.33%)` | `82.00 <3.00> (+7.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `71.25% <100.00%> (-0.36%)` | `17.00 <2.00> (+1.00)` | :arrow_down: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [...he/dolphinscheduler/api/service/LoggerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTG9nZ2VyU2VydmljZS5qYXZh) | `82.60% <0.00%> (-8.70%)` | `9.00% <0.00%> (-1.00%)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `74.60% <0.00%> (-3.18%)` | `14.00% <0.00%> (ø%)` | |
| [...e/dolphinscheduler/remote/NettyRemotingClient.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL05ldHR5UmVtb3RpbmdDbGllbnQuamF2YQ==) | `51.07% <0.00%> (-2.88%)` | `9.00% <0.00%> (-2.00%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [8f8ddae...4694500](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] yangyichao-mango commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
yangyichao-mango commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-670458100
> Hi , @samz406 @yangyichao-mango , could this PR be merged?
I think split copy and move to two api will be better, but at present it LGTM, we can improve it later.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r442612995
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
##########
@@ -176,6 +176,10 @@
DELETE_WORKER_GROUP_FAIL(10147,"delete worker group fail ", "删除worker分组失败"),
COPY_PROCESS_DEFINITION_ERROR(10148,"copy process definition error", "复制工作流错误"),
USER_DISABLED(10149,"The current user is disabled", "当前用户已停用"),
+ QUERY_USER_CREATED_PROJECT_ERROR(10151,"query user created project error error", "查询用户创建的项目错误"),
+ PROCESS_DEFINITION_IDS_IS_EMPTY(10152,"process definition ids is empty", "工作流IDS不能为空"),
+ COPY_OR_MOVE_PROCESS_DEFINITION_ERROR(10148,"copy or move process definition error", "复制或者移动工作流错误"),
+ MOVE_PROCESS_DEFINITION_ERROR(10150,"move process definition error", "移动工作流错误"),
Review comment:
problem fixed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-655367758
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637951279
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [2 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0.png' alt='8.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [8.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus.png' alt='20.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [20.7% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444612172
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
##########
@@ -226,6 +227,23 @@ public Result queryAuthorizedProject(@ApiIgnore @RequestAttribute(value = Consta
return returnDataList(result);
}
+ /**
+ * query user created project
+ *
+ * @param loginUser login user
+ * @return projects which the user create
+ */
+ @ApiOperation(value = "queryProjectCreatedByUser", notes = "QUERY_USER_CREATED_PROJECT_NOTES")
+
+ @GetMapping(value = "/login-user-created-project")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(QUERY_USER_CREATED_PROJECT_ERROR)
+ public Result queryProjectCreatedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ logger.info("login user {}, query authorized project by user id: {}.", StringUtils.replaceNRTtoUnderline(loginUser.getUserName()), StringUtils.replaceNRTtoUnderline(String.valueOf(loginUser.getId())));
+ Map<String, Object> result = projectService.queryProjectCreatedByUser(loginUser, loginUser.getId());
Review comment:
The purpose of this function design is to get the project created by the logged-in user, so I think there is no problem using userid
————————————————————————————————————————————————————
这个函数设计的目的就是获取登录用户所创建的项目,所以我认为使用userid没有问题
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] samz406 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
samz406 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444682186
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
##########
@@ -226,6 +227,23 @@ public Result queryAuthorizedProject(@ApiIgnore @RequestAttribute(value = Consta
return returnDataList(result);
}
+ /**
+ * query user created project
+ *
+ * @param loginUser login user
+ * @return projects which the user create
+ */
+ @ApiOperation(value = "queryProjectCreatedByUser", notes = "QUERY_USER_CREATED_PROJECT_NOTES")
+
+ @GetMapping(value = "/login-user-created-project")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(QUERY_USER_CREATED_PROJECT_ERROR)
+ public Result queryProjectCreatedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ logger.info("login user {}, query authorized project by user id: {}.", StringUtils.replaceNRTtoUnderline(loginUser.getUserName()), StringUtils.replaceNRTtoUnderline(String.valueOf(loginUser.getId())));
+ Map<String, Object> result = projectService.queryProjectCreatedByUser(loginUser, loginUser.getId());
Review comment:
queryProjectCreatedByUser 方法其实传loginUser 值就可以了啊。在方法里面直接loginUser.getId() 获取userid。不影响功能啊。
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650674373
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.5%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.5% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637951279
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [2 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0.png' alt='8.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [8.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus.png' alt='20.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [20.7% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656999444
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444830862
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProjectService.java
##########
@@ -43,7 +43,7 @@
*HttpTask./
Review comment:
Makes no sense, I changed it back
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638120282
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='66.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [66.4% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-665396120
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/40bbef5e3dd4e9f5eae3a9a11e03234d4fd87a1a&el=desc) will **decrease** coverage by `0.12%`.
> The diff coverage is `60.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
- Coverage 39.59% 39.47% -0.13%
- Complexity 2717 2720 +3
============================================
Files 435 435
Lines 20113 20192 +79
Branches 2452 2464 +12
============================================
+ Hits 7963 7970 +7
- Misses 11392 11456 +64
- Partials 758 766 +8
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `60.05% <52.23%> (-0.82%)` | `85.00 <10.00> (+10.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `72.28% <100.00%> (+0.68%)` | `17.00 <2.00> (+1.00)` | |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [.../server/worker/processor/TaskExecuteProcessor.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL3dvcmtlci9wcm9jZXNzb3IvVGFza0V4ZWN1dGVQcm9jZXNzb3IuamF2YQ==) | `10.16% <0.00%> (-27.12%)` | `1.00% <0.00%> (-2.00%)` | |
| [...duler/server/entity/DataxTaskExecutionContext.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL2VudGl0eS9EYXRheFRhc2tFeGVjdXRpb25Db250ZXh0LmphdmE=) | `75.00% <0.00%> (-20.00%)` | `11.00% <0.00%> (-2.00%)` | |
| [...nscheduler/server/entity/TaskExecutionContext.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL2VudGl0eS9UYXNrRXhlY3V0aW9uQ29udGV4dC5qYXZh) | `89.10% <0.00%> (-9.91%)` | `61.00% <0.00%> (-5.00%)` | |
| [...he/dolphinscheduler/api/service/LoggerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTG9nZ2VyU2VydmljZS5qYXZh) | `82.60% <0.00%> (-8.70%)` | `9.00% <0.00%> (-1.00%)` | |
| ... and [1 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [40bbef5...d49376b](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648102204
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648618241
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650679955
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.7% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-647227019
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650881931
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.7% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650679955
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.7% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] Rubik-W commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
Rubik-W commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r446498357
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject = projectMapper.queryByName(targetProjectName);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectName);
+ return result;
+ }else{
+ return createProcessDefinition(
+ loginUser,
+ targetProjectName,
+ processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
+ processDefinition.getProcessDefinitionJson(),
+ processDefinition.getDescription(),
+ processDefinition.getLocations(),
+ processDefinition.getConnects());
+ }
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectName targetProjectName
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ String targetProjectName, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, targetProjectName);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ if(!targetProjectName.equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProjectName);
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProjectName, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProjectName, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(result, failedIdList);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProjectName targetProjectName
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(String targetProjectName, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProjectName);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add(processDefinitionId);
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProjectName targetProjectName
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, String targetProjectName, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProjectName);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add(processDefinitionId);
+ logger.error((String) copyProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * check project and auth
+ * @param loginUser
+ * @param projectName
+ * @return
+ */
+ private Map<String, Object> checkProjectAndAuth(User loginUser, String projectName) {
Project project = projectMapper.queryByName(projectName);
+ //check user access for project
Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
Status resultStatus = (Status) checkResult.get(Constants.STATUS);
+
if (resultStatus != Status.SUCCESS) {
return checkResult;
}
+ return null;
+ }
+
+ /**
+ * move process definition
+ * @param processId processId
+ * @param targetProjectName targetProjectName
+ * @return move result code
+ */
+ private Map<String, Object> moveProcessDefinition(Integer processId,
+ String targetProjectName) {
+
+ Map<String, Object> result = new HashMap<>(5);
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
- return createProcessDefinition(
- loginUser,
- projectName,
- processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
- processDefinition.getProcessDefinitionJson(),
- processDefinition.getDescription(),
- processDefinition.getLocations(),
- processDefinition.getConnects());
+ Project targetProject = projectMapper.queryByName(targetProjectName);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, processId);
+ return result;
+ }else{
+ processDefinition.setProjectId(targetProject.getId());
+ processDefinition.setUpdateTime(new Date());
+ if (processDefineMapper.updateById(processDefinition) > 0) {
+ putMsg(result, Status.SUCCESS);
+ } else {
+ putMsg(result, Status.UPDATE_PROCESS_DEFINITION_ERROR);
+ }
+ return result;
+ }
+ }
+ }
+
+ /**
+ * check batch operate result
+ * @param result
+ * @param failedIdList
+ */
+ private void checkBatchOperateResult(Map<String, Object> result, List<String> failedIdList) {
+ if (!failedIdList.isEmpty()) {
+ putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR, String.join(",", failedIdList));
Review comment:
failedIdList -> failedNameList
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/2749c7e5369459c1a410508cc4769db37f4a0043&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `58.13%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
+ Coverage 37.20% 37.22% +0.01%
- Complexity 2559 2569 +10
============================================
Files 435 435
Lines 20020 20096 +76
Branches 2426 2438 +12
============================================
+ Hits 7449 7481 +32
- Misses 11904 11937 +33
- Partials 667 678 +11
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.77% <52.23%> (-1.10%)` | `84.00 <8.00> (+9.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `71.25% <100.00%> (-0.36%)` | `17.00 <2.00> (+1.00)` | :arrow_down: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [...he/dolphinscheduler/api/service/LoggerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTG9nZ2VyU2VydmljZS5qYXZh) | `82.60% <0.00%> (-8.70%)` | `9.00% <0.00%> (-1.00%)` | |
| [...cheduler/server/registry/ZookeeperNodeManager.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL3JlZ2lzdHJ5L1pvb2tlZXBlck5vZGVNYW5hZ2VyLmphdmE=) | `74.72% <0.00%> (-3.30%)` | `6.00% <0.00%> (-1.00%)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `71.42% <0.00%> (-3.18%)` | `14.00% <0.00%> (ø%)` | |
| [...pache/dolphinscheduler/common/utils/FileUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL0ZpbGVVdGlscy5qYXZh) | `28.03% <0.00%> (-0.94%)` | `9.00% <0.00%> (ø%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [2749c7e...a273966](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] Rubik-W commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
Rubik-W commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r446498242
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject = projectMapper.queryByName(targetProjectName);
Review comment:
Hi, This is not fixed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] gabrywu commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
gabrywu commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-671187043
> > > Hi , @samz406 @yangyichao-mango , could this PR be merged?
> >
> >
> > I think split copy and move to two api will be better, but at present it LGTM, we can improve it later.
>
> i will split it next week
@yangyichao-mango @zixi0825 split in 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-671801723
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='67.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [67.9% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-652976289
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/8f8ddae03098b60f0c4f1637c1e3b5670df18b70&el=desc) will **decrease** coverage by `0.11%`.
> The diff coverage is `58.13%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
- Coverage 37.21% 37.10% -0.12%
- Complexity 2560 2563 +3
============================================
Files 435 435
Lines 20020 20096 +76
Branches 2426 2438 +12
============================================
+ Hits 7451 7457 +6
- Misses 11904 11961 +57
- Partials 665 678 +13
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.77% <52.23%> (-1.10%)` | `84.00 <8.00> (+9.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `71.25% <100.00%> (-0.36%)` | `17.00 <2.00> (+1.00)` | :arrow_down: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [.../server/worker/processor/TaskExecuteProcessor.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL3dvcmtlci9wcm9jZXNzb3IvVGFza0V4ZWN1dGVQcm9jZXNzb3IuamF2YQ==) | `10.16% <0.00%> (-27.12%)` | `1.00% <0.00%> (-2.00%)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `68.25% <0.00%> (-9.53%)` | `13.00% <0.00%> (-1.00%)` | |
| [...he/dolphinscheduler/api/service/LoggerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTG9nZ2VyU2VydmljZS5qYXZh) | `82.60% <0.00%> (-8.70%)` | `9.00% <0.00%> (-1.00%)` | |
| [...nscheduler/server/entity/TaskExecutionContext.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL2VudGl0eS9UYXNrRXhlY3V0aW9uQ29udGV4dC5qYXZh) | `81.18% <0.00%> (-5.95%)` | `57.00% <0.00%> (-3.00%)` | |
| ... and [1 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [8f8ddae...bb41a4f](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650674373
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.5%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.5% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-651746338
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-652976289
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638078710
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-646421792
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656484615
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648780757
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.4% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650881931
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.7% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/dcdd7dedd06454ed468eae86881b75177261c9e2&el=desc) will **increase** coverage by `0.12%`.
> The diff coverage is `66.85%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
+ Coverage 33.52% 33.64% +0.12%
- Complexity 2395 2411 +16
============================================
Files 442 442
Lines 20613 20696 +83
Branches 2525 2538 +13
============================================
+ Hits 6910 6963 +53
- Misses 13044 13063 +19
- Partials 659 670 +11
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...scheduler/api/controller/AlertGroupController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvQWxlcnRHcm91cENvbnRyb2xsZXIuamF2YQ==) | `5.26% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...uler/api/controller/ProcessInstanceController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0luc3RhbmNlQ29udHJvbGxlci5qYXZh) | `4.00% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...olphinscheduler/api/service/DataSourceService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRGF0YVNvdXJjZVNlcnZpY2UuamF2YQ==) | `0.61% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...dolphinscheduler/api/service/SchedulerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvU2NoZWR1bGVyU2VydmljZS5qYXZh) | `2.52% <0.00%> (ø)` | `3.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/MonitorService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTW9uaXRvclNlcnZpY2UuamF2YQ==) | `25.00% <25.00%> (ø)` | `2.00 <1.00> (ø)` | |
| [.../dolphinscheduler/api/service/ExecutorService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRXhlY3V0b3JTZXJ2aWNlLmphdmE=) | `33.90% <33.33%> (ø)` | `19.00 <4.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.71% <53.75%> (-1.16%)` | `85.00 <34.00> (+10.00)` | :arrow_down: |
| [...phinscheduler/api/service/DataAnalysisService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRGF0YUFuYWx5c2lzU2VydmljZS5qYXZh) | `59.75% <75.00%> (ø)` | `14.00 <9.00> (ø)` | |
| ... and [16 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [dcdd7de...b38b012](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-665396120
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/1b54c76ed8981e9feea1f172e2c81c5b3e0cd789&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `66.85%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
+ Coverage 34.15% 34.22% +0.07%
- Complexity 2422 2434 +12
============================================
Files 443 443
Lines 20637 20720 +83
Branches 2531 2544 +13
============================================
+ Hits 7049 7092 +43
- Misses 12926 12957 +31
- Partials 662 671 +9
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...scheduler/api/controller/AlertGroupController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvQWxlcnRHcm91cENvbnRyb2xsZXIuamF2YQ==) | `5.26% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...uler/api/controller/ProcessInstanceController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0luc3RhbmNlQ29udHJvbGxlci5qYXZh) | `4.00% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...olphinscheduler/api/service/DataSourceService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRGF0YVNvdXJjZVNlcnZpY2UuamF2YQ==) | `0.61% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...dolphinscheduler/api/service/SchedulerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvU2NoZWR1bGVyU2VydmljZS5qYXZh) | `24.78% <0.00%> (ø)` | `13.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/MonitorService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTW9uaXRvclNlcnZpY2UuamF2YQ==) | `13.63% <25.00%> (ø)` | `2.00 <1.00> (ø)` | |
| [.../dolphinscheduler/api/service/ExecutorService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRXhlY3V0b3JTZXJ2aWNlLmphdmE=) | `33.90% <33.33%> (ø)` | `19.00 <4.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.71% <53.75%> (-1.16%)` | `85.00 <34.00> (+10.00)` | :arrow_down: |
| [...phinscheduler/api/service/DataAnalysisService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRGF0YUFuYWx5c2lzU2VydmljZS5qYXZh) | `59.75% <75.00%> (ø)` | `14.00 <9.00> (ø)` | |
| ... and [15 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [1b54c76...a4428dd](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] dailidong merged pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
dailidong merged pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444608164
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, processDefinitionIds);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ Project targetProject = projectMapper.queryDetailById(targetProjectId);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectId);
+ return result;
+ }
+
+ if(!(targetProject.getName()).equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProject.getName());
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProject, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProject, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(projectName,targetProject.getName(),result, failedIdList,isCopy);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) moveProcessDefinitionResult.get(Constants.MSG));
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) copyProcessDefinitionResult.get(Constants.MSG));
Review comment:
In my opinion, simply returning the id does not fully express the reason for the failure, I designed it to return a more complete cause of the error
---------------------------------------------------------------------------------------------------------------------------------
在我看来,仅仅返回id并不能完全表达失败的原因,我这么设计是为了返回更加完整的错误原因
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-646594990
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] break60 commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
break60 commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656436340
Do not change the front-end .env file
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-646594990
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444610053
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
The initial value of HashMap in all Controller and Service in DolphinScheduler is 5, so if you want to modify it, then it is best to unify all changes after discussion
————————————————————————————————————————————
在DolphinScheduler中所有的Controller和Service中HashMap的初始值都为5,所以如果要修改的话,那么最好经过讨论以后,统一全部修改
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-670464641
> > Hi , @samz406 @yangyichao-mango , could this PR be merged?
>
> I think split copy and move to two api will be better, but at present it LGTM, we can improve it later.
i will split it next week
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] Rubik-W commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
Rubik-W commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r438528485
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
Review comment:
Annotate is wrong
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -95,27 +95,33 @@ public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
}
/**
- * copy process definition
+ * copy or move process definition
*
* @param loginUser login user
* @param projectName project name
- * @param processId process definition id
+ * @param isCopy isCopy
+ * @param processDefinitionIds process definition ids
+ * @param targetProjectName target project name
* @return copy result code
*/
- @ApiOperation(value = "copyProcessDefinition", notes= "COPY_PROCESS_DEFINITION_NOTES")
+ @ApiOperation(value = "copyOrMoveProcessDefinition", notes= "COPY_OR_MOVE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = "3,4")
})
- @PostMapping(value = "/copy")
+ @PostMapping(value = "/copy-or-move")
@ResponseStatus(HttpStatus.OK)
- @ApiException(COPY_PROCESS_DEFINITION_ERROR)
- public Result copyProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
- @RequestParam(value = "processId", required = true) int processId) throws JsonProcessingException {
- logger.info("copy process definition, login user:{}, project name:{}, process definition id:{}",
- loginUser.getUserName(), projectName, processId);
- Map<String, Object> result = processDefinitionService.copyProcessDefinition(loginUser, projectName, processId);
- return returnDataList(result);
+ @ApiException(COPY_OR_MOVE_PROCESS_DEFINITION_ERROR)
+ public Result copyOrMoveProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+ @RequestParam(value = "processDefinitionIds", required = true) String processDefinitionIds,
+ @RequestParam(value = "targetProjectName",required = true) String targetProjectName,
+ @RequestParam(value = "isCopy", required = true) boolean isCopy) {
Review comment:
Please add parameters to ApiImplicitParams()
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -95,27 +95,33 @@ public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
}
/**
- * copy process definition
+ * copy or move process definition
*
* @param loginUser login user
* @param projectName project name
- * @param processId process definition id
+ * @param isCopy isCopy
+ * @param processDefinitionIds process definition ids
+ * @param targetProjectName target project name
* @return copy result code
*/
- @ApiOperation(value = "copyProcessDefinition", notes= "COPY_PROCESS_DEFINITION_NOTES")
+ @ApiOperation(value = "copyOrMoveProcessDefinition", notes= "COPY_OR_MOVE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = "3,4")
})
- @PostMapping(value = "/copy")
+ @PostMapping(value = "/copy-or-move")
@ResponseStatus(HttpStatus.OK)
- @ApiException(COPY_PROCESS_DEFINITION_ERROR)
- public Result copyProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
- @RequestParam(value = "processId", required = true) int processId) throws JsonProcessingException {
- logger.info("copy process definition, login user:{}, project name:{}, process definition id:{}",
- loginUser.getUserName(), projectName, processId);
- Map<String, Object> result = processDefinitionService.copyProcessDefinition(loginUser, projectName, processId);
- return returnDataList(result);
+ @ApiException(COPY_OR_MOVE_PROCESS_DEFINITION_ERROR)
+ public Result copyOrMoveProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+ @RequestParam(value = "processDefinitionIds", required = true) String processDefinitionIds,
+ @RequestParam(value = "targetProjectName",required = true) String targetProjectName,
+ @RequestParam(value = "isCopy", required = true) boolean isCopy) {
+
+
+ logger.info("batch {} process definition, login user:{}, project name:{}, process definition ids:{},target project name:{}",
+ isCopy?"copy":"move",StringUtils.replaceNRTtoUnderline(loginUser.getUserName()), StringUtils.replaceNRTtoUnderline(projectName), StringUtils.replaceNRTtoUnderline(processDefinitionIds),StringUtils.replaceNRTtoUnderline(targetProjectName));
Review comment:
Please add parameters to log
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
##########
@@ -176,6 +176,10 @@
DELETE_WORKER_GROUP_FAIL(10147,"delete worker group fail ", "删除worker分组失败"),
COPY_PROCESS_DEFINITION_ERROR(10148,"copy process definition error", "复制工作流错误"),
USER_DISABLED(10149,"The current user is disabled", "当前用户已停用"),
+ QUERY_USER_CREATED_PROJECT_ERROR(10151,"query user created project error error", "查询用户创建的项目错误"),
+ PROCESS_DEFINITION_IDS_IS_EMPTY(10152,"process definition ids is empty", "工作流IDS不能为空"),
+ COPY_OR_MOVE_PROCESS_DEFINITION_ERROR(10148,"copy or move process definition error", "复制或者移动工作流错误"),
+ MOVE_PROCESS_DEFINITION_ERROR(10150,"move process definition error", "移动工作流错误"),
Review comment:
1. 10148 repeat
2. arranged in order
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject = projectMapper.queryByName(targetProjectName);
Review comment:
It is recommended to use the project ID.
Future projects will be logic delete, The project name may be duplicated.
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject = projectMapper.queryByName(targetProjectName);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectName);
+ return result;
+ }else{
+ return createProcessDefinition(
+ loginUser,
+ targetProjectName,
+ processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
+ processDefinition.getProcessDefinitionJson(),
+ processDefinition.getDescription(),
+ processDefinition.getLocations(),
+ processDefinition.getConnects());
+ }
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectName targetProjectName
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ String targetProjectName, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, targetProjectName);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ if(!targetProjectName.equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProjectName);
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProjectName, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProjectName, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(result, failedIdList);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProjectName targetProjectName
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(String targetProjectName, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProjectName);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add(processDefinitionId);
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProjectName targetProjectName
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, String targetProjectName, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProjectName);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add(processDefinitionId);
+ logger.error((String) copyProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * check project and auth
+ * @param loginUser
+ * @param projectName
+ * @return
+ */
+ private Map<String, Object> checkProjectAndAuth(User loginUser, String projectName) {
Project project = projectMapper.queryByName(projectName);
+ //check user access for project
Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
Status resultStatus = (Status) checkResult.get(Constants.STATUS);
+
if (resultStatus != Status.SUCCESS) {
return checkResult;
}
+ return null;
+ }
+
+ /**
+ * move process definition
+ * @param processId processId
+ * @param targetProjectName targetProjectName
+ * @return move result code
+ */
+ private Map<String, Object> moveProcessDefinition(Integer processId,
+ String targetProjectName) {
+
+ Map<String, Object> result = new HashMap<>(5);
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
- return createProcessDefinition(
- loginUser,
- projectName,
- processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
- processDefinition.getProcessDefinitionJson(),
- processDefinition.getDescription(),
- processDefinition.getLocations(),
- processDefinition.getConnects());
+ Project targetProject = projectMapper.queryByName(targetProjectName);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, processId);
+ return result;
+ }else{
+ processDefinition.setProjectId(targetProject.getId());
+ processDefinition.setUpdateTime(new Date());
+ if (processDefineMapper.updateById(processDefinition) > 0) {
+ putMsg(result, Status.SUCCESS);
+ } else {
+ putMsg(result, Status.UPDATE_PROCESS_DEFINITION_ERROR);
+ }
+ return result;
+ }
+ }
+ }
+
+ /**
+ * check batch operate result
+ * @param result
+ * @param failedIdList
+ */
+ private void checkBatchOperateResult(Map<String, Object> result, List<String> failedIdList) {
+ if (!failedIdList.isEmpty()) {
+ putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR, String.join(",", failedIdList));
Review comment:
It is recommended the error message return project name.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/2d0fe8a8c68d915de0852da53198ebeb1cc48ae6&el=desc) will **increase** coverage by `0.08%`.
> The diff coverage is `66.85%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
+ Coverage 33.39% 33.48% +0.08%
- Complexity 2373 2386 +13
============================================
Files 441 441
Lines 20518 20601 +83
Branches 2505 2518 +13
============================================
+ Hits 6853 6898 +45
- Misses 13018 13047 +29
- Partials 647 656 +9
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...scheduler/api/controller/AlertGroupController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvQWxlcnRHcm91cENvbnRyb2xsZXIuamF2YQ==) | `5.26% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...uler/api/controller/ProcessInstanceController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0luc3RhbmNlQ29udHJvbGxlci5qYXZh) | `4.00% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...olphinscheduler/api/service/DataSourceService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRGF0YVNvdXJjZVNlcnZpY2UuamF2YQ==) | `0.61% <0.00%> (ø)` | `2.00 <0.00> (ø)` | |
| [...dolphinscheduler/api/service/SchedulerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvU2NoZWR1bGVyU2VydmljZS5qYXZh) | `2.52% <0.00%> (ø)` | `3.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/MonitorService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTW9uaXRvclNlcnZpY2UuamF2YQ==) | `25.00% <25.00%> (ø)` | `2.00 <1.00> (ø)` | |
| [.../dolphinscheduler/api/service/ExecutorService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRXhlY3V0b3JTZXJ2aWNlLmphdmE=) | `33.90% <33.33%> (ø)` | `19.00 <4.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.71% <53.75%> (-1.16%)` | `85.00 <34.00> (+10.00)` | :arrow_down: |
| [...phinscheduler/api/service/DataAnalysisService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvRGF0YUFuYWx5c2lzU2VydmljZS5qYXZh) | `59.75% <75.00%> (ø)` | `14.00 <9.00> (ø)` | |
| ... and [14 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [2d0fe8a...68695b8](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] samz406 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
samz406 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444682837
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
This was discussed before, you can send an email and change it in a unified way
这个之前讨论过,你可以发个邮件,统一改了
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638059107
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [2 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [10 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/eef397675b72ad894b08045305435e0ef5946f7e&el=desc) will **decrease** coverage by `0.06%`.
> The diff coverage is `60.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
- Coverage 39.53% 39.47% -0.07%
- Complexity 2715 2720 +5
============================================
Files 435 435
Lines 20125 20204 +79
Branches 2454 2466 +12
============================================
+ Hits 7956 7975 +19
- Misses 11411 11461 +50
- Partials 758 768 +10
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...che/dolphinscheduler/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL1N0cmluZ1V0aWxzLmphdmE=) | `75.00% <0.00%> (-10.72%)` | `10.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `60.05% <52.23%> (-0.82%)` | `85.00 <10.00> (+10.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `72.28% <100.00%> (+0.68%)` | `17.00 <2.00> (+1.00)` | |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [...he/dolphinscheduler/common/enums/SqoopJobType.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL2VudW1zL1Nxb29wSm9iVHlwZS5qYXZh) | `0.00% <0.00%> (-88.89%)` | `0.00% <0.00%> (-3.00%)` | |
| [...duler/server/entity/DataxTaskExecutionContext.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL2VudGl0eS9EYXRheFRhc2tFeGVjdXRpb25Db250ZXh0LmphdmE=) | `75.00% <0.00%> (-20.00%)` | `11.00% <0.00%> (-2.00%)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `68.25% <0.00%> (-6.35%)` | `13.00% <0.00%> (-1.00%)` | |
| [...ver/master/consumer/TaskPriorityQueueConsumer.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL21hc3Rlci9jb25zdW1lci9UYXNrUHJpb3JpdHlRdWV1ZUNvbnN1bWVyLmphdmE=) | `47.44% <0.00%> (-4.38%)` | `16.00% <0.00%> (ø%)` | |
| ... and [3 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [eef3976...c18e98b](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638078710
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-651746338
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648102204
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] break60 commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
break60 commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-641682317
Please solve ut
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r442612804
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -95,27 +95,33 @@ public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
}
/**
- * copy process definition
+ * copy or move process definition
*
* @param loginUser login user
* @param projectName project name
- * @param processId process definition id
+ * @param isCopy isCopy
+ * @param processDefinitionIds process definition ids
+ * @param targetProjectName target project name
* @return copy result code
*/
- @ApiOperation(value = "copyProcessDefinition", notes= "COPY_PROCESS_DEFINITION_NOTES")
+ @ApiOperation(value = "copyOrMoveProcessDefinition", notes= "COPY_OR_MOVE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = "3,4")
})
- @PostMapping(value = "/copy")
+ @PostMapping(value = "/copy-or-move")
@ResponseStatus(HttpStatus.OK)
- @ApiException(COPY_PROCESS_DEFINITION_ERROR)
- public Result copyProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
- @RequestParam(value = "processId", required = true) int processId) throws JsonProcessingException {
- logger.info("copy process definition, login user:{}, project name:{}, process definition id:{}",
- loginUser.getUserName(), projectName, processId);
- Map<String, Object> result = processDefinitionService.copyProcessDefinition(loginUser, projectName, processId);
- return returnDataList(result);
+ @ApiException(COPY_OR_MOVE_PROCESS_DEFINITION_ERROR)
+ public Result copyOrMoveProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+ @RequestParam(value = "processDefinitionIds", required = true) String processDefinitionIds,
+ @RequestParam(value = "targetProjectName",required = true) String targetProjectName,
+ @RequestParam(value = "isCopy", required = true) boolean isCopy) {
Review comment:
problem fixed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/8f8ddae03098b60f0c4f1637c1e3b5670df18b70&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `47.42%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
- Coverage 37.21% 37.19% -0.03%
- Complexity 2560 2566 +6
============================================
Files 435 435
Lines 20020 20108 +88
Branches 2426 2444 +18
============================================
+ Hits 7451 7479 +28
- Misses 11904 11948 +44
- Partials 665 681 +16
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `83.03% <12.50%> (-3.68%)` | `39.00 <1.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.07% <46.75%> (-1.80%)` | `82.00 <6.00> (+7.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `72.28% <100.00%> (+0.68%)` | `18.00 <3.00> (+2.00)` | |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `68.25% <0.00%> (-9.53%)` | `13.00% <0.00%> (-1.00%)` | |
| [...he/dolphinscheduler/api/service/LoggerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTG9nZ2VyU2VydmljZS5qYXZh) | `82.60% <0.00%> (-8.70%)` | `9.00% <0.00%> (-1.00%)` | |
| [...e/dolphinscheduler/remote/NettyRemotingClient.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL05ldHR5UmVtb3RpbmdDbGllbnQuamF2YQ==) | `53.23% <0.00%> (-0.72%)` | `10.00% <0.00%> (-1.00%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [8f8ddae...247503a](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638059107
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [2 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [10 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] break60 removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
break60 removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656436340
Do not change the front-end .env file
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656451513
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656451513
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-660594547
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-671788236
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [3 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='67.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [67.9% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10.png' alt='9.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [9.9% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650677868
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.7% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-650677868
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.7%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.7% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638000561
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [2 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50.png' alt='57.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [57.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20.png' alt='14.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [14.1% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] Rubik-W commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
Rubik-W commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-642431704
1. After confirming the move workflow, does the modification on the workflow instance list page have an impact?
2. Confirm there are no file changes on the front-end page ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444843156
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, processDefinitionIds);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ Project targetProject = projectMapper.queryDetailById(targetProjectId);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectId);
+ return result;
+ }
+
+ if(!(targetProject.getName()).equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProject.getName());
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProject, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProject, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(projectName,targetProject.getName(),result, failedIdList,isCopy);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) moveProcessDefinitionResult.get(Constants.MSG));
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) copyProcessDefinitionResult.get(Constants.MSG));
Review comment:
I have changed it to the name of the workflow that returned the error. If the error information is returned, it cannot be ruled out that the information is incomplete
我已经将其修改为返回出错的工作流名称了,返回错误描述的话确实不能排除信息不完整的情况
例子:如果工作流不存在的话,返回的信息如下:
从project_test1复制工作流到project_test1错误 : 47[null]
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444702802
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
##########
@@ -226,6 +227,23 @@ public Result queryAuthorizedProject(@ApiIgnore @RequestAttribute(value = Consta
return returnDataList(result);
}
+ /**
+ * query user created project
+ *
+ * @param loginUser login user
+ * @return projects which the user create
+ */
+ @ApiOperation(value = "queryProjectCreatedByUser", notes = "QUERY_USER_CREATED_PROJECT_NOTES")
+
+ @GetMapping(value = "/login-user-created-project")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(QUERY_USER_CREATED_PROJECT_ERROR)
+ public Result queryProjectCreatedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ logger.info("login user {}, query authorized project by user id: {}.", StringUtils.replaceNRTtoUnderline(loginUser.getUserName()), StringUtils.replaceNRTtoUnderline(String.valueOf(loginUser.getId())));
+ Map<String, Object> result = projectService.queryProjectCreatedByUser(loginUser, loginUser.getId());
Review comment:
You're right
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-646411886
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-660408208
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-671699546
> > > > Hi , @samz406 @yangyichao-mango , could this PR be merged?
> > >
> > >
> > > I think split copy and move to two api will be better, but at present it LGTM, we can improve it later.
> >
> >
> > i will split it next week
>
> @yangyichao-mango @zixi0825 split in this PR?
yes
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] gabrywu commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
gabrywu commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-671741672
@zixi0825 Please resolve the conflicting files, then PR can be merged
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638120282
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='66.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [66.4% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-667486008
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='71.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [71.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r447369400
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject = projectMapper.queryByName(targetProjectName);
Review comment:
![image](https://user-images.githubusercontent.com/10829956/86075862-98987380-babb-11ea-9a4c-b538c7ea7d3a.png)
What you see should be old code, the new code has fixed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] samz406 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
samz406 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444282276
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
Review comment:
Hashmap does not recommend the initial value odd,No need to initialize
##########
File path: dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
##########
@@ -179,16 +181,33 @@ public void testQueryProcessDefinitionById() throws Exception {
}
@Test
- public void testCopyProcessDefinition() throws Exception {
+ public void testBatchCopyProcessDefinition() throws Exception {
String projectName = "test";
- int id = 1;
+ int targetProjectId = 2;
+ String id = "1";
+
+ Map<String, Object> result = new HashMap<>(5);
+ putMsg(result, Status.SUCCESS);
+
+ Mockito.when(processDefinitionService.batchCopyOrMoveProcessDefinition(user,projectName,id,targetProjectId,true)).thenReturn(result);
+ Result response = processDefinitionController.copyOrMoveProcessDefinition(user, projectName,id,targetProjectId,true);
+
+ Assert.assertEquals(Status.SUCCESS.getCode(),response.getCode().intValue());
+ }
+
+ @Test
+ public void testBatchMoveProcessDefinition() throws Exception {
+
+ String projectName = "test";
+ int targetProjectId = 2;
+ String id = "1";
Map<String, Object> result = new HashMap<>(5);
Review comment:
Hashmap does not recommend the initial value odd,No need to initialize
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
Hashmap does not recommend the initial value odd,No need to initialize
##########
File path: dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
##########
@@ -179,16 +181,33 @@ public void testQueryProcessDefinitionById() throws Exception {
}
@Test
- public void testCopyProcessDefinition() throws Exception {
+ public void testBatchCopyProcessDefinition() throws Exception {
String projectName = "test";
- int id = 1;
+ int targetProjectId = 2;
+ String id = "1";
+
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
Hashmap does not recommend the initial value odd,No need to initialize
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
##########
@@ -226,6 +227,23 @@ public Result queryAuthorizedProject(@ApiIgnore @RequestAttribute(value = Consta
return returnDataList(result);
}
+ /**
+ * query user created project
+ *
+ * @param loginUser login user
+ * @return projects which the user create
+ */
+ @ApiOperation(value = "queryProjectCreatedByUser", notes = "QUERY_USER_CREATED_PROJECT_NOTES")
+
+ @GetMapping(value = "/login-user-created-project")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(QUERY_USER_CREATED_PROJECT_ERROR)
+ public Result queryProjectCreatedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ logger.info("login user {}, query authorized project by user id: {}.", StringUtils.replaceNRTtoUnderline(loginUser.getUserName()), StringUtils.replaceNRTtoUnderline(String.valueOf(loginUser.getId())));
+ Map<String, Object> result = projectService.queryProjectCreatedByUser(loginUser, loginUser.getId());
Review comment:
queryProjectCreatedByUser can define a parameter, you can not userid
##########
File path: dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
##########
@@ -224,8 +226,52 @@ public void testCopyProcessDefinition() throws Exception{
definition.getLocations(),
definition.getConnects())).thenReturn(createProcessResult);
- Map<String, Object> successRes = processDefinitionService.copyProcessDefinition(loginUser,
- "project_test1", 46);
+ Map<String, Object> successRes = processDefinitionService.batchCopyOrMoveProcessDefinition(loginUser,"project_test1",
+ "46",1,true);
+
+ Assert.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS));
+ }
+
+ @Test
+ public void testBatchMoveProcessDefinition() throws Exception{
+ String projectName = "project_test1";
+ Mockito.when(projectMapper.queryByName(projectName)).thenReturn(getProject(projectName));
+
+ String projectName2 = "project_test2";
+ Mockito.when(projectMapper.queryByName(projectName2)).thenReturn(getProject(projectName2));
+
+ int targetProjectId = 2;
+ Mockito.when(projectMapper.queryDetailById(targetProjectId)).thenReturn(getProjectById(targetProjectId));
+
+ Project project = getProject(projectName);
+ Project targetProject = getProjectById(targetProjectId);
+
+ User loginUser = new User();
+ loginUser.setId(-1);
+ loginUser.setUserType(UserType.GENERAL_USER);
+
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
Hashmap does not recommend the initial value odd,No need to initialize
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, processDefinitionIds);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ Project targetProject = projectMapper.queryDetailById(targetProjectId);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectId);
+ return result;
+ }
+
+ if(!(targetProject.getName()).equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProject.getName());
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProject, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProject, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(projectName,targetProject.getName(),result, failedIdList,isCopy);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) moveProcessDefinitionResult.get(Constants.MSG));
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) copyProcessDefinitionResult.get(Constants.MSG));
Review comment:
i think failedIdList should store the id, but there added may be a failed description statement not the id
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, processDefinitionIds);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ Project targetProject = projectMapper.queryDetailById(targetProjectId);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectId);
+ return result;
+ }
+
+ if(!(targetProject.getName()).equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProject.getName());
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProject, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProject, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(projectName,targetProject.getName(),result, failedIdList,isCopy);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) moveProcessDefinitionResult.get(Constants.MSG));
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) copyProcessDefinitionResult.get(Constants.MSG));
+ logger.error((String) copyProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * check project and auth
+ * @param loginUser
+ * @param projectName
+ * @return
+ */
+ private Map<String, Object> checkProjectAndAuth(User loginUser, String projectName) {
+ Project project = projectMapper.queryByName(projectName);
+
+ //check user access for project
+ Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
+ Status resultStatus = (Status) checkResult.get(Constants.STATUS);
+
+ if (resultStatus != Status.SUCCESS) {
+ return checkResult;
+ }
+ return null;
+ }
+
+ /**
+ * move process definition
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return move result code
+ */
+ private Map<String, Object> moveProcessDefinition(Integer processId,
+ Project targetProject) {
+
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
Hashmap does not recommend the initial value odd,No need to initialize
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProjectService.java
##########
@@ -43,7 +43,7 @@
*HttpTask./
Review comment:
Modify note description
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-647227019
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648618241
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r442612941
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -95,27 +95,33 @@ public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
}
/**
- * copy process definition
+ * copy or move process definition
*
* @param loginUser login user
* @param projectName project name
- * @param processId process definition id
+ * @param isCopy isCopy
+ * @param processDefinitionIds process definition ids
+ * @param targetProjectName target project name
* @return copy result code
*/
- @ApiOperation(value = "copyProcessDefinition", notes= "COPY_PROCESS_DEFINITION_NOTES")
+ @ApiOperation(value = "copyOrMoveProcessDefinition", notes= "COPY_OR_MOVE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = "3,4")
})
- @PostMapping(value = "/copy")
+ @PostMapping(value = "/copy-or-move")
@ResponseStatus(HttpStatus.OK)
- @ApiException(COPY_PROCESS_DEFINITION_ERROR)
- public Result copyProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
- @RequestParam(value = "processId", required = true) int processId) throws JsonProcessingException {
- logger.info("copy process definition, login user:{}, project name:{}, process definition id:{}",
- loginUser.getUserName(), projectName, processId);
- Map<String, Object> result = processDefinitionService.copyProcessDefinition(loginUser, projectName, processId);
- return returnDataList(result);
+ @ApiException(COPY_OR_MOVE_PROCESS_DEFINITION_ERROR)
+ public Result copyOrMoveProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+ @RequestParam(value = "processDefinitionIds", required = true) String processDefinitionIds,
+ @RequestParam(value = "targetProjectName",required = true) String targetProjectName,
+ @RequestParam(value = "isCopy", required = true) boolean isCopy) {
+
+
+ logger.info("batch {} process definition, login user:{}, project name:{}, process definition ids:{},target project name:{}",
+ isCopy?"copy":"move",StringUtils.replaceNRTtoUnderline(loginUser.getUserName()), StringUtils.replaceNRTtoUnderline(projectName), StringUtils.replaceNRTtoUnderline(processDefinitionIds),StringUtils.replaceNRTtoUnderline(targetProjectName));
Review comment:
Parameters already exist
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-645955317
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-646421792
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-655367758
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648780757
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.4% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638070475
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656999444
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638000561
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [2 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50.png' alt='57.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [57.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20.png' alt='14.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [14.1% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r446587161
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
OK!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-641691940
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='66.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [66.4% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-commenter edited a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-637999294
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=h1) Report
> Merging [#2884](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/8f8ddae03098b60f0c4f1637c1e3b5670df18b70&el=desc) will **decrease** coverage by `0.08%`.
> The diff coverage is `56.79%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9)](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #2884 +/- ##
============================================
- Coverage 37.21% 37.13% -0.09%
- Complexity 2560 2562 +2
============================================
Files 435 435
Lines 20020 20091 +71
Branches 2426 2440 +14
============================================
+ Hits 7451 7461 +10
- Misses 11904 11953 +49
- Partials 665 677 +12
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...hinscheduler/api/controller/ProjectController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvamVjdENvbnRyb2xsZXIuamF2YQ==) | `5.88% <0.00%> (-0.57%)` | `2.00 <0.00> (ø)` | |
| [...cheduler/api/service/ProcessDefinitionService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvY2Vzc0RlZmluaXRpb25TZXJ2aWNlLmphdmE=) | `59.54% <49.20%> (-1.33%)` | `82.00 <3.00> (+7.00)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `71.25% <100.00%> (-0.36%)` | `17.00 <2.00> (+1.00)` | :arrow_down: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <100.00%> (ø)` | `5.00 <0.00> (ø)` | |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `87.27% <100.00%> (+0.56%)` | `41.00 <3.00> (+2.00)` | |
| [...duler/server/entity/DataxTaskExecutionContext.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL2VudGl0eS9EYXRheFRhc2tFeGVjdXRpb25Db250ZXh0LmphdmE=) | `35.00% <0.00%> (-60.00%)` | `7.00% <0.00%> (-6.00%)` | |
| [...he/dolphinscheduler/common/thread/ThreadUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3RocmVhZC9UaHJlYWRVdGlscy5qYXZh) | `68.25% <0.00%> (-9.53%)` | `13.00% <0.00%> (-1.00%)` | |
| [...he/dolphinscheduler/api/service/LoggerService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvTG9nZ2VyU2VydmljZS5qYXZh) | `82.60% <0.00%> (-8.70%)` | `9.00% <0.00%> (-1.00%)` | |
| [...ver/master/consumer/TaskPriorityQueueConsumer.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL21hc3Rlci9jb25zdW1lci9UYXNrUHJpb3JpdHlRdWV1ZUNvbnN1bWVyLmphdmE=) | `54.41% <0.00%> (-4.42%)` | `16.00% <0.00%> (ø%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=footer). Last update [8f8ddae...309fa0c](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/2884?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444610053
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
Review comment:
The initial value of HashMap in all Controller and Service in DolphinScheduler is 5, so if you want to modify it, then it is best to unify all changes after discussion
————————————————————————————————————————————-————————
在DolphinScheduler中所有的Controller和Service中HashMap的初始值都为5,所以如果要修改的话,那么最好经过讨论以后,统一全部修改
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] yangyichao-mango commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
yangyichao-mango commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r461539404
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/BaseService.java
##########
@@ -32,7 +32,7 @@
/**
* base service
*/
-public class BaseService {
+public class BaseService{
Review comment:
Hi,
Please revert this blank.
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/BaseService.java
##########
@@ -32,7 +32,7 @@
/**
* base service
*/
-public class BaseService {
+public class BaseService{
Review comment:
Hi,
Please revert this blank.
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -1256,7 +1427,7 @@ public void importSubProcess(User loginUser, Project targetProject, ArrayNode js
* @return tree view json data
* @throws Exception exception
*/
- public Map<String, Object> viewTree(Integer processId, Integer limit) throws Exception {
+ public Map<String, Object> viewTree(Integer processId, Integer limit) throws Exception{
Review comment:
Please revert this changes
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -95,27 +95,39 @@ public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
}
/**
- * copy process definition
+ * copy or move process definition
*
* @param loginUser login user
* @param projectName project name
- * @param processId process definition id
+ * @param isCopy isCopy
+ * @param processDefinitionIds process definition ids
+ * @param targetProjectId target project id
* @return copy result code
*/
- @ApiOperation(value = "copyProcessDefinition", notes= "COPY_PROCESS_DEFINITION_NOTES")
+ @ApiOperation(value = "copyOrMoveProcessDefinition", notes= "COPY_OR_MOVE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = "3,4"),
+ @ApiImplicitParam(name = "targetProjectId", value = "TARGET_PROJECT_ID", required = true, type = "Integer"),
+ @ApiImplicitParam(name = "isCopy", value = "IS_COPY", required = true, type = "boolean")
})
- @PostMapping(value = "/copy")
+ @PostMapping(value = "/copy-or-move")
Review comment:
Hi,
Will it be better to split copy and move to two api for single responsibility?
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -205,9 +217,9 @@ public Result updateProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
@ResponseStatus(HttpStatus.OK)
@ApiException(RELEASE_PROCESS_DEFINITION_ERROR)
public Result releaseProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
- @RequestParam(value = "processId", required = true) int processId,
- @RequestParam(value = "releaseState", required = true) int releaseState) {
+ @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+ @RequestParam(value = "processId", required = true) int processId,
+ @RequestParam(value = "releaseState", required = true) int releaseState) {
Review comment:
Please revert this changes.
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -231,8 +243,8 @@ public Result releaseProcessDefinition(@ApiIgnore @RequestAttribute(value = Cons
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR)
public Result queryProcessDefinitionById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
- @RequestParam("processId") Integer processId
+ @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+ @RequestParam("processId") Integer processId
Review comment:
Please revert the changes about blank, thx a lot, it is suggested to add the blank according to the checkstyle.xml, you can configure the checkstyle.xml[1] to your ide.
[1] https://github.com/apache/incubator-dolphinscheduler/blob/dev/style/checkstyle.xml
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-646411886
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='69.1%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [69.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-671788236
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [3 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='67.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [67.9% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10.png' alt='9.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [9.9% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-648770856
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.9% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-656484615
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r442614869
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject = projectMapper.queryByName(targetProjectName);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectName);
+ return result;
+ }else{
+ return createProcessDefinition(
+ loginUser,
+ targetProjectName,
+ processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
+ processDefinition.getProcessDefinitionJson(),
+ processDefinition.getDescription(),
+ processDefinition.getLocations(),
+ processDefinition.getConnects());
+ }
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectName targetProjectName
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ String targetProjectName, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, targetProjectName);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ if(!targetProjectName.equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProjectName);
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProjectName, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProjectName, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(result, failedIdList);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProjectName targetProjectName
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(String targetProjectName, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProjectName);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add(processDefinitionId);
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProjectName targetProjectName
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, String targetProjectName, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProjectName);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add(processDefinitionId);
+ logger.error((String) copyProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * check project and auth
+ * @param loginUser
+ * @param projectName
+ * @return
+ */
+ private Map<String, Object> checkProjectAndAuth(User loginUser, String projectName) {
Project project = projectMapper.queryByName(projectName);
+ //check user access for project
Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
Status resultStatus = (Status) checkResult.get(Constants.STATUS);
+
if (resultStatus != Status.SUCCESS) {
return checkResult;
}
+ return null;
+ }
+
+ /**
+ * move process definition
+ * @param processId processId
+ * @param targetProjectName targetProjectName
+ * @return move result code
+ */
+ private Map<String, Object> moveProcessDefinition(Integer processId,
+ String targetProjectName) {
+
+ Map<String, Object> result = new HashMap<>(5);
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
- return createProcessDefinition(
- loginUser,
- projectName,
- processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
- processDefinition.getProcessDefinitionJson(),
- processDefinition.getDescription(),
- processDefinition.getLocations(),
- processDefinition.getConnects());
+ Project targetProject = projectMapper.queryByName(targetProjectName);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, processId);
+ return result;
+ }else{
+ processDefinition.setProjectId(targetProject.getId());
+ processDefinition.setUpdateTime(new Date());
+ if (processDefineMapper.updateById(processDefinition) > 0) {
+ putMsg(result, Status.SUCCESS);
+ } else {
+ putMsg(result, Status.UPDATE_PROCESS_DEFINITION_ERROR);
+ }
+ return result;
+ }
+ }
+ }
+
+ /**
+ * check batch operate result
+ * @param result
+ * @param failedIdList
+ */
+ private void checkBatchOperateResult(Map<String, Object> result, List<String> failedIdList) {
+ if (!failedIdList.isEmpty()) {
+ putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR, String.join(",", failedIdList));
Review comment:
already add project name
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-643969297
> 1. After confirming the move workflow, does the modification on the workflow instance list page have an impact?
> 2. Confirm there are no file changes on the front-end page ?
to 1 : I will add the instance linkage after move workflow
to 2:The modification of the front-end will be completed by @break60
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-660408208
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-638070475
SonarCloud Quality Gate failed.
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B.png' alt='B' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [1 Vulnerability](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='65.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [65.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-660594547
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='70.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [70.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] gabrywu commented on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
gabrywu commented on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-670343345
Hi , @samz406 @yangyichao-mango , could this PR be merged?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] zixi0825 commented on a change in pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
zixi0825 commented on a change in pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444608164
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,38 +294,209 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
*
- * @param loginUser login user
- * @param projectName project name
- * @param processId process definition id
- * @return copy result code
+ * @param loginUser loginUser
+ * @param processId processId
+ * @param targetProject targetProject
+ * @return
+ * @throws JsonProcessingException
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ Project targetProject) throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
- Project project = projectMapper.queryByName(projectName);
-
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName);
- Status resultStatus = (Status) checkResult.get(Constants.STATUS);
- if (resultStatus != Status.SUCCESS) {
- return checkResult;
- }
ProcessDefinition processDefinition = processDefineMapper.selectById(processId);
if (processDefinition == null) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
return result;
} else {
+
return createProcessDefinition(
loginUser,
- projectName,
+ targetProject.getName(),
processDefinition.getName() + "_copy_" + System.currentTimeMillis(),
processDefinition.getProcessDefinitionJson(),
processDefinition.getDescription(),
processDefinition.getLocations(),
processDefinition.getConnects());
+
+ }
+ }
+
+ /**
+ * batch copy or move process definition
+ * @param loginUser loginUser
+ * @param projectName projectName
+ * @param processDefinitionIds processDefinitionIds
+ * @param targetProjectId targetProjectId
+ * @param isCopy isCopy
+ * @return
+ */
+ public Map<String, Object> batchCopyOrMoveProcessDefinition(User loginUser,
+ String projectName,
+ String processDefinitionIds,
+ int targetProjectId, boolean isCopy){
+ Map<String, Object> result = new HashMap<>(5);
+ List<String> failedIdList = new ArrayList<>();
+
+ if (StringUtils.isEmpty(processDefinitionIds)) {
+ putMsg(result, Status.PROCESS_DEFINITION_IDS_IS_EMPTY, processDefinitionIds);
+ return result;
+ }
+
+ //check src project auth
+ Map<String, Object> checkResult = checkProjectAndAuth(loginUser, projectName);
+ if (checkResult != null) {
+ return checkResult;
+ }
+
+ Project targetProject = projectMapper.queryDetailById(targetProjectId);
+ if(targetProject == null){
+ putMsg(result, Status.PROJECT_NOT_FOUNT, targetProjectId);
+ return result;
+ }
+
+ if(!(targetProject.getName()).equals(projectName)){
+ Map<String, Object> checkTargetProjectResult = checkProjectAndAuth(loginUser, targetProject.getName());
+ if (checkTargetProjectResult != null) {
+ return checkTargetProjectResult;
+ }
+ }
+
+ String[] processDefinitionIdList = processDefinitionIds.split(Constants.COMMA);
+ if(isCopy){
+ doBatchCopyProcessDefinition(loginUser, targetProject, failedIdList, processDefinitionIdList);
+ }else{
+ doBatchMoveProcessDefinition(targetProject, failedIdList, processDefinitionIdList);
+ }
+
+ checkBatchOperateResult(projectName,targetProject.getName(),result, failedIdList,isCopy);
+
+ return result;
+ }
+
+ /**
+ * batch move process definition
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchMoveProcessDefinition(Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> moveProcessDefinitionResult =
+ moveProcessDefinition(Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(moveProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) moveProcessDefinitionResult.get(Constants.MSG));
+ logger.error((String) moveProcessDefinitionResult.get(Constants.MSG));
+ }
+ } catch (Exception e) {
+ failedIdList.add(processDefinitionId);
+ }
+ }
+ }
+
+ /**
+ * batch copy process definition
+ * @param loginUser loginUser
+ * @param targetProject targetProject
+ * @param failedIdList failedIdList
+ * @param processDefinitionIdList processDefinitionIdList
+ */
+ private void doBatchCopyProcessDefinition(User loginUser, Project targetProject, List<String> failedIdList, String[] processDefinitionIdList) {
+ for(String processDefinitionId:processDefinitionIdList){
+ try {
+ Map<String, Object> copyProcessDefinitionResult =
+ copyProcessDefinition(loginUser,Integer.valueOf(processDefinitionId),targetProject);
+ if (!Status.SUCCESS.equals(copyProcessDefinitionResult.get(Constants.STATUS))) {
+ failedIdList.add((String) copyProcessDefinitionResult.get(Constants.MSG));
Review comment:
In my opinion, simply returning the id does not fully express the reason for the failure, I designed it to return a more complete cause of the error
---------------------------------------------------------------------------------------------------------------------------------
在我看来,仅仅返回id并不能完全表达失败的原因,我这么设计是为了返回更加完整的错误原因
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-667486008
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
ct/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='71.2%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [71.2% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #2884: batch copy or move process #2753
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #2884:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2884#issuecomment-641691940
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=SECURITY_HOTSPOT) to review)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=2884&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60.png' alt='66.4%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list) [66.4% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_coverage&view=list)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=2884&metric=new_duplicated_lines_density&view=list)
<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more [here](https://sonarcloud.io/documentation/upcoming/)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org