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


##########
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:
   > > What about expand updateResourceInfo with taskCode and version?
   > 
   > May i ask why we have to add `taskVersion`?
   
   Yes, I think we need to add code and version, 
`taskDefinitionMapper.queryByCode(taskDefinition.getCode())` means query the 
current using version, but current version maybe is not queal 
`taskDefinition.version`.



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