Radeity commented on code in PR #13536:
URL: 
https://github.com/apache/dolphinscheduler/pull/13536#discussion_r1102338315


##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -1377,7 +1377,8 @@ public void updateTaskDefinitionResources(TaskDefinition 
taskDefinition) {
                 ResourceInfo mainJar = JSONUtils.parseObject(
                         JSONUtils.toJsonString(mainJarObj),
                         ResourceInfo.class);
-                ResourceInfo resourceInfo = 
updateResourceInfo(taskDefinition.getId(), mainJar);
+                ResourceInfo resourceInfo =
+                        
updateResourceInfo(taskDefinitionMapper.queryByCode(taskDefinition.getCode()).getId(),
 mainJar);

Review Comment:
   > but current version maybe is not equal taskDefinition.version.
   
   Current version may be different, but they have the same code, which is 
equal to `taskDefinition.code`, so that we can query the right resource task 
relation.



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

Reply via email to