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


##########
airflow/utils/log/file_task_handler.py:
##########
@@ -92,16 +102,17 @@ def _render_filename(self, ti: TaskInstance, try_number: 
int) -> str:
         with create_session() as session:
             dag_run = ti.get_dagrun(session=session)
             template = dag_run.get_log_template(session=session).filename
-        str_tpl, jinja_tpl = parse_template_string(template)
+            str_tpl, jinja_tpl = parse_template_string(template)

Review Comment:
   if you look a few lines below, we need to keep `context = 
ti.get_template_context(session=session)`
   in the same session.  otherwise it creates a new session (provided by 
provide_session), and this can cause problems post-os.fork.  this is why the 
test for standard task runner previously blew away the entire log config 
because. with this, we don't have to do that anymore.



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