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

taragolis 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 e3938899e1 Remove getattr in es task handler when airflow min version 
bumped to 2.6 (#36431)
e3938899e1 is described below

commit e3938899e1022420360727f247ba38c82f98a211
Author: Gopal Dirisala <[email protected]>
AuthorDate: Tue Dec 26 14:40:54 2023 +0530

    Remove getattr in es task handler when airflow min version bumped to 2.6 
(#36431)
    
    Co-authored-by: gopal <[email protected]>
---
 airflow/providers/elasticsearch/log/es_task_handler.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/airflow/providers/elasticsearch/log/es_task_handler.py 
b/airflow/providers/elasticsearch/log/es_task_handler.py
index 227148e52b..1320756a2c 100644
--- a/airflow/providers/elasticsearch/log/es_task_handler.py
+++ b/airflow/providers/elasticsearch/log/es_task_handler.py
@@ -462,8 +462,7 @@ class ElasticsearchTaskHandler(FileTaskHandler, 
ExternalLoggingMixin, LoggingMix
         if self.closed:
             return
 
-        # todo: remove `getattr` when min airflow version >= 2.6
-        if not self.mark_end_on_close or getattr(self, "ctx_task_deferred", 
None):
+        if not self.mark_end_on_close:
             # when we're closing due to task deferral, don't mark end of log
             self.closed = True
             return

Reply via email to