hiSandog commented on code in PR #10941:
URL: https://github.com/apache/dolphinscheduler/pull/10941#discussion_r921148939
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java:
##########
@@ -171,10 +171,11 @@ public Map<String, Long> getCodeAndVersion(String
projectName, String processDef
}
ProcessDefinition processDefinition =
processDefinitionMapper.queryByDefineName(project.getCode(),
processDefinitionName);
+ // In the case project exists, but current process definition still
not created, we should also return the init version of it
if (processDefinition == null) {
- String msg = String.format("Can not find valid process definition
by name %s", processDefinitionName);
- logger.error(msg);
- throw new IllegalArgumentException(msg);
+ result.put("code", CodeGenerateUtils.getInstance().genCode());
+ result.put("version", 0L);
+ return result;
Review Comment:
lgtm
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]