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

pankajkoti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 69cea850cb Ship zombie info (#32693)
69cea850cb is described below

commit 69cea850cb37217675ccfef28917a9bd9679387d
Author: Wei Lee <[email protected]>
AuthorDate: Fri Nov 17 17:39:22 2023 +0900

    Ship zombie info (#32693)
    
    Send log from scheduler to Task log upon zombie detections.
---
 airflow/jobs/scheduler_job_runner.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/airflow/jobs/scheduler_job_runner.py 
b/airflow/jobs/scheduler_job_runner.py
index 334790817b..1264af56a5 100644
--- a/airflow/jobs/scheduler_job_runner.py
+++ b/airflow/jobs/scheduler_job_runner.py
@@ -1754,7 +1754,12 @@ class SchedulerJobRunner(BaseJobRunner, LoggingMixin):
                 simple_task_instance=SimpleTaskInstance.from_ti(ti),
                 msg=str(zombie_message_details),
             )
-            self.log.error("Detected zombie job: %s", request)
+            log_message = (
+                f"Detected zombie job: {request} "
+                "(See https://airflow.apache.org/docs/apache-airflow/";
+                "stable/core-concepts/tasks.html#zombie-undead-tasks)"
+            )
+            self._task_context_logger.error(log_message, ti=ti)
             self.job.executor.send_callback(request)
             Stats.incr("zombies_killed", tags={"dag_id": ti.dag_id, "task_id": 
ti.task_id})
 

Reply via email to