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

shahar1 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 9a0ee6f0c66 Remove unused task deferral logging bridge (#75777)
9a0ee6f0c66 is described below

commit 9a0ee6f0c664f8dae3312492eff35f121ef6498a
Author: Hussein Awala <[email protected]>
AuthorDate: Tue Oct 27 22:04:49 2026 +0100

    Remove unused task deferral logging bridge (#75777)
    
    The private log-handler bridge has no callers in the current execution 
paths. Retain the inherited ctx_task_deferred attribute for external 
log-handler compatibility.
---
 .../src/airflow/utils/log/file_task_handler.py        | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/airflow-core/src/airflow/utils/log/file_task_handler.py 
b/airflow-core/src/airflow/utils/log/file_task_handler.py
index f20db27722b..c4790fe206b 100644
--- a/airflow-core/src/airflow/utils/log/file_task_handler.py
+++ b/airflow-core/src/airflow/utils/log/file_task_handler.py
@@ -144,25 +144,6 @@ class LogType(str, Enum):
     WORKER = "worker"
 
 
-def _set_task_deferred_context_var():
-    """
-    Tell task log handler that task exited with deferral.
-
-    This exists for the sole purpose of telling elasticsearch handler not to
-    emit end_of_log mark after task deferral.
-
-    Depending on how the task is run, we may need to set this in task command 
or in local task job.
-    Kubernetes executor requires the local task job invocation; local executor 
requires the task
-    command invocation.
-
-    :meta private:
-    """
-    logger = logging.getLogger()
-    with suppress(StopIteration):
-        h = next(h for h in logger.handlers if hasattr(h, "ctx_task_deferred"))
-        h.ctx_task_deferred = True
-
-
 def _fetch_logs_from_service(url: str, log_relative_path: str) -> Response:
     # Import occurs in function scope for perf. Ref: 
https://github.com/apache/airflow/pull/21438
     import requests

Reply via email to