chengshiwen commented on a change in pull request #4569:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/4569#discussion_r564186100



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
##########
@@ -133,7 +133,7 @@
     QUERY_TASK_INSTANCE_LOG_ERROR(10103, "view task instance log error", 
"查询任务实例日志错误"),
     DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR(10104, "download task instance log 
file error", "下载任务日志文件错误"),
     CREATE_PROCESS_DEFINITION(10105, "create process definition", "创建工作流错误"),
-    VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR(10106, "verify process 
definition name unique error", "工作流定义名称已存在"),

Review comment:
       There is essentially no difference between the 
`VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR` and 
`PROCESS_DEFINITION_NAME_EXIST`, and it's not necessary to add an additional 
error code.
   The easiest way is just renaming 
`VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR ` to another 

##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -495,7 +495,7 @@ private String getResourceIds(ProcessData processData) {
         if (processDefinition == null) {
             putMsg(result, Status.SUCCESS);
         } else {
-            putMsg(result, Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR, 
name);
+            putMsg(result, Status.PROCESS_DEFINITION_NAME_EXIST, name);

Review comment:
       Replace `VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR` with 
`PROCESS_DEFINITION_NAME_EXIST ` and ignore 
`VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR` in other references, so it leads 
to failing the unit test.
   Maybe you should consider all references of the 
`VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR` globally




----------------------------------------------------------------
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:
[email protected]


Reply via email to