dstandish commented on code in PR #32977:
URL: https://github.com/apache/airflow/pull/32977#discussion_r1397801715


##########
airflow/providers/elasticsearch/log/es_task_handler.py:
##########
@@ -182,8 +183,14 @@ def format_url(host: str) -> str:
 
         return host
 
-    def _render_log_id(self, ti: TaskInstance, try_number: int) -> str:
+    def _render_log_id(self, ti: TaskInstance | TaskInstanceKey, try_number: 
int) -> str:
+        from airflow.models.taskinstance import TaskInstance, TaskInstanceKey
+
         with create_session() as session:
+            if isinstance(ti, TaskInstanceKey):
+                ti = TaskInstance.get_by_key(ti, session)

Review Comment:
   right yeah i will push code
   
   for now i'll just duplicate the private method
   
   want to think it through before adding to public interface



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