uranusjr commented on code in PR #31772:
URL: https://github.com/apache/airflow/pull/31772#discussion_r1222564464


##########
airflow/api_connexion/endpoints/log_endpoint.py:
##########
@@ -77,18 +78,17 @@ def get_log(
     if not task_log_reader.supports_read:
         raise BadRequest("Task log handler does not support read logs.")
     query = (
-        session.query(TaskInstance)
-        .filter(
+        select(TaskInstance)
+        .where(
             TaskInstance.task_id == task_id,
             TaskInstance.dag_id == dag_id,
             TaskInstance.run_id == dag_run_id,
             TaskInstance.map_index == map_index,
         )
         .join(TaskInstance.dag_run)
-        .options(joinedload("trigger"))
-        .options(joinedload("trigger.triggerer_job"))
+        .options(joinedload(TaskInstance.trigger))

Review Comment:
   Does this still need to join `triggerer_job`?



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