seanghaeli commented on code in PR #66379:
URL: https://github.com/apache/airflow/pull/66379#discussion_r3290677279


##########
providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:
##########
@@ -666,8 +666,14 @@ def _get_source_includes(self, extra_fields: Iterable[str] 
= ()) -> list[str]:
             ["@timestamp", *TASK_LOG_FIELDS, self.host_field, 
self.offset_field, *extra_fields]
         )
 
-    def upload(self, path: os.PathLike | str, ti: RuntimeTI):
+    def upload(self, path: os.PathLike | str, ti: RuntimeTI | None = None) -> 
None:
         """Write the log to ElasticSearch."""
+        if ti is None:
+            self.log.warning(
+                "Skipping Elasticsearch log upload: task instance is required 
for log ID rendering"

Review Comment:
   Agreed, removed



-- 
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