This is an automated email from the ASF dual-hosted git repository.
potiuk 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 9c28e766b3 Make ElasticSearch Provider compatible for Airflow<2.3
(#22814)
9c28e766b3 is described below
commit 9c28e766b3a7bf93b4c8ec5422a5a25f10117fcc
Author: Kaxil Naik <[email protected]>
AuthorDate: Thu Apr 7 13:50:02 2022 +0100
Make ElasticSearch Provider compatible for Airflow<2.3 (#22814)
`ti.map_index` is not released yet and even once it is released in 2.3, we
still want this provider to be backwards compatible, this fixes it.
---
airflow/providers/elasticsearch/log/es_task_handler.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/providers/elasticsearch/log/es_task_handler.py
b/airflow/providers/elasticsearch/log/es_task_handler.py
index 85f8b1f15a..bb19130e7d 100644
--- a/airflow/providers/elasticsearch/log/es_task_handler.py
+++ b/airflow/providers/elasticsearch/log/es_task_handler.py
@@ -134,7 +134,7 @@ class ElasticsearchTaskHandler(FileTaskHandler,
ExternalLoggingMixin, LoggingMix
data_interval_end=data_interval_end,
execution_date=execution_date,
try_number=try_number,
- map_index=ti.map_index,
+ map_index=getattr(ti, "map_index", ""),
)
@staticmethod