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

jedcunningham 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 2ad151389c Improve task deadlock messaging (#27734)
2ad151389c is described below

commit 2ad151389ce30e07336107fdc32adb9717a8bb42
Author: Daniel Standish <[email protected]>
AuthorDate: Thu Nov 17 05:54:55 2022 -0800

    Improve task deadlock messaging (#27734)
    
    When one encounters "deadlock" in the logs, it's confusing because most 
people will immediately think database deadlock.
    
    But it's really about task dependencies.  I thought about changing it to 
just "Dag has no runnable tasks", but the deadlong naming kindof has a meaning 
in the codebase so I tried to bridge the gap by clarifying it's specifically a 
_task_ deadlock.
---
 airflow/models/dagrun.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow/models/dagrun.py b/airflow/models/dagrun.py
index 81114a6b61..a5c3d790cf 100644
--- a/airflow/models/dagrun.py
+++ b/airflow/models/dagrun.py
@@ -608,7 +608,7 @@ class DagRun(Base, LoggingMixin):
 
         # if *all tasks* are deadlocked, the run failed
         elif unfinished.should_schedule and not are_runnable_tasks:
-            self.log.error("Deadlock; marking run %s failed", self)
+            self.log.error("Task deadlock (no runnable tasks); marking run %s 
failed", self)
             self.set_state(DagRunState.FAILED)
             if execute_callbacks:
                 dag.handle_callback(self, success=False, 
reason="all_tasks_deadlocked", session=session)

Reply via email to