This is an automated email from the ASF dual-hosted git repository.

caishunfeng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new ba0a253f09 fix k8s task run fail (#13348)
ba0a253f09 is described below

commit ba0a253f09fa55e1100a1f340eca9bde7d88a682
Author: caishunfeng <[email protected]>
AuthorDate: Fri Jan 6 12:44:12 2023 +1100

    fix k8s task run fail (#13348)
---
 .../dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java
 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java
index 414c9c6302..27a31818f4 100644
--- 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java
+++ 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java
@@ -155,8 +155,13 @@ public class K8sTaskExecutor extends 
AbstractK8sTaskExecutor {
 
             @Override
             public void eventReceived(Action action, Job job) {
+                logger.info("event received : job:{} action:{}", 
job.getMetadata().getName(), action);
                 if (action != Action.ADDED) {
                     int jobStatus = getK8sJobStatus(job);
+                    logger.info("job {} status {}", 
job.getMetadata().getName(), jobStatus);
+                    if (jobStatus == TaskConstants.RUNNING_CODE) {
+                        return;
+                    }
                     setTaskStatus(jobStatus, taskInstanceId, taskResponse, 
k8STaskMainParameters);
                     countDownLatch.countDown();
                 }

Reply via email to