dstandish commented on code in PR #31241:
URL: https://github.com/apache/airflow/pull/31241#discussion_r1264079820
##########
airflow/utils/log/file_task_handler.py:
##########
@@ -218,9 +242,12 @@ def close(self):
if self.handler:
self.handler.close()
- def _render_filename(self, ti: TaskInstance, try_number: int) -> str:
+ def _render_filename(self, ti: TaskInstance | TaskInstanceKey, try_number:
int) -> str:
"""Returns the worker log filename."""
+ from airflow.models.taskinstance import TaskInstance
+
with create_session() as session:
+ ti = TaskInstance.from_ti(ti, session=session)
dag_run = ti.get_dagrun(session=session)
Review Comment:
Yeah as you mentioned on slack, i was just making quick conclusions based on
what i saw in the code but it appears that this is not a global feature, just a
backcompat flag in ES handler. but maybe we should make it a config and then we
could use it here.
--
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]