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/09/30 09:23:32 UTC

[GitHub] [incubator-dolphinscheduler] zhuangchong opened a new pull request #3864: [fix-3843][api] When the update workflow definition name already exists, the prompt is not friendly add process define name verify.

zhuangchong opened a new pull request #3864:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3864


   ## What is the purpose of the pull request
   #3843 
   
   problem:
   The workflow definition name already exists, saved workflow ,prompt: update workflow definition error
   
   The reason for this problem is that the user tenant or queue or project is empty. When the workflow definition is saved, the verification of the workflow definition name fails, the projectId and processDefineName construct unique constraints, and the workflow update fails when the data is saved.
   
   I think that the workflow definition name verification only needs to verify the existence of projectId and processDefineName,The original query method is called in many places without modification.
   
   ```
    select pd.*,u.user_name,p.name as project_name,t.tenant_code,t.tenant_name,q.queue,q.queue_name
           from t_ds_process_definition pd
           JOIN t_ds_user u ON pd.user_id = u.id
           JOIN  t_ds_project p ON pd.project_id = p.id
           JOIN  t_ds_tenant t ON t.id = u.tenant_id
           JOIN t_ds_queue q ON t.queue_id = q.id
           WHERE p.id = #{projectId}
           and pd.name = #{processDefinitionName}
   ```
   add verifyByDefineName
   ```
   select pd.*
           from t_ds_process_definition pd
           WHERE pd.project_id = #{projectId}
           and pd.name = #{processDefinitionName}
   ```
   
   ## Brief change log
   
   add ProcessDefinitionMapper.verifyByDefineName(int projectId,String name)
   
   ## Verify this pull request
   This change added tests and can be verified as follows:
     - *Manually verified the change by testing locally.*
   
   ---
   
   ##拉取请求的目的是什么
   问题
   工作流程定义名称已存在,更新工作流定义,保存名称,提示:更新工作流程定义错误
   
   出现这个问题的原因,用户租户或队列或项目为空导致,导致工作流定义保存时,工作流定义名称验证失败,projectId和processDefineName构建唯一约束,数据保存时报工作流更新失败。
   
   我认为工作流定义名称验证,只需要验证projectId和processDefineName是否存在即可,原查询方法多处调用,并未做修改。
   
   ```
    select pd.*,u.user_name,p.name as project_name,t.tenant_code,t.tenant_name,q.queue,q.queue_name
           from t_ds_process_definition pd
           JOIN t_ds_user u ON pd.user_id = u.id
           JOIN  t_ds_project p ON pd.project_id = p.id
           JOIN  t_ds_tenant t ON t.id = u.tenant_id
           JOIN t_ds_queue q ON t.queue_id = q.id
           WHERE p.id = #{projectId}
           and pd.name = #{processDefinitionName}
   ```
   add verifyByDefineName
   ```
   select pd.*
           from t_ds_process_definition pd
           WHERE pd.project_id = #{projectId}
           and pd.name = #{processDefinitionName}
   ```
   
   ##简要更改日志
   
   新增ProcessDefinitionMapper.verifyByDefineName(int projectId,String 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] sonarcloud[bot] commented on pull request #3864: [fix-3843][api] When the update workflow definition name already exists, the prompt is not friendly add process define name verify.

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3864:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3864#issuecomment-701281204


   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=3864&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=3864&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3864&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=3864&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=3864&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3864&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=3864&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/proje
 ct/issues?id=apache-dolphinscheduler&pullRequest=3864&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=3864&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=3864&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3864&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100.png' alt='100.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3864&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3864&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=3864&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3864&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] xingchun-chen commented on pull request #3864: [fix-3843][api] When the update workflow definition name already exists, the prompt is not friendly add process define name verify.

Posted by GitBox <gi...@apache.org>.
xingchun-chen commented on pull request #3864:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3864#issuecomment-705925383


   can you mention the code in 1.3.3-release
    
   


----------------------------------------------------------------
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] lgcareer merged pull request #3864: [fix-3843][api] When the update workflow definition name already exists, the prompt is not friendly add process define name verify.

Posted by GitBox <gi...@apache.org>.
lgcareer merged pull request #3864:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3864


   


----------------------------------------------------------------
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] xingchun-chen commented on pull request #3864: [fix-3843][api] When the update workflow definition name already exists, the prompt is not friendly add process define name verify.

Posted by GitBox <gi...@apache.org>.
xingchun-chen commented on pull request #3864:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3864#issuecomment-705925383


   can you mention the code in 1.3.3-release
    
   


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