Owen-CH-Leung commented on code in PR #33135:
URL: https://github.com/apache/airflow/pull/33135#discussion_r1285872836


##########
airflow/providers/elasticsearch/log/es_task_handler.py:
##########
@@ -101,8 +101,8 @@ def __init__(
         super().__init__(base_log_folder, filename_template)
         self.closed = False
 
-        self.client = elasticsearch.Elasticsearch(host.split(";"), 
**es_kwargs)  # type: ignore[attr-defined]
-
+        self.client = elasticsearch.Elasticsearch(host, **es_kwargs)  # type: 
ignore[attr-defined]
+        # in airflow.cfg, host of elasticsearch has to be 
http://dockerhostXxxx:9200

Review Comment:
   In ES 8, when constructing a new ElasticSearch client, a full URL including 
http / https is expected, and you will get a `ValueError` when calling the 
`__init__` like below: 
   
   <img width="948" alt="image" 
src="https://github.com/apache/airflow/assets/43698890/342d4516-efd3-426c-99ce-3a396cdfa89f";>
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to