shouwangyw commented on code in PR #16616:
URL: 
https://github.com/apache/dolphinscheduler/pull/16616#discussion_r1796415653


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/execute/MasterTaskExecutor.java:
##########
@@ -100,6 +101,15 @@ public void run() {
             TaskInstanceLogHeader.printInitializeTaskContextHeader();
             initializeTask();
 
+            if (DRY_RUN_FLAG_YES == taskExecutionContext.getDryRun()) {
+                
taskExecutionContext.setCurrentExecutionStatus(TaskExecutionStatus.SUCCESS);
+                taskExecutionContext.setEndTime(System.currentTimeMillis());
+                
MasterTaskExecutorHolder.removeMasterTaskExecutor(taskExecutionContext.getTaskInstanceId());
+                
logicTaskInstanceExecutionEventSenderManager.successEventSender().sendMessage(taskExecutionContext);
+                log.info(
+                        "The current execute mode is dry run, will stop the 
logic task and set the taskInstance status to success");
+                return;
+            }

Review Comment:
   I have change, test is ok
   
   <img width="1664" alt="image" 
src="https://github.com/user-attachments/assets/e2e22ad2-cda7-4e51-90f2-64adaa522f10";>
   <img width="1129" alt="image" 
src="https://github.com/user-attachments/assets/6d85f4bc-b522-4477-b1d8-7c7847678493";>
   



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