pierrejeambrun commented on code in PR #70312:
URL: https://github.com/apache/airflow/pull/70312#discussion_r3668443872
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -141,6 +141,7 @@ def get_dag_run(dag_id: str, dag_run_id: str, session:
SessionDep) -> DAGRunResp
status.HTTP_404_NOT_FOUND,
f"The DagRun with dag_id: `{dag_id}` and run_id: `{dag_run_id}`
was not found",
)
+ attach_team_names([dag_run], session=session)
Review Comment:
I think the eager loading on team doesn't cost anything cause there won't be
any team to join on.
For the eager loading of bundles, we can make this "raise" when not loaded
just to be sure on the relationship, and only join the query (preload) if the
condition is met from a config standpoint. Today this preloading is done in
views or service most of the time. And condition this on the serialized if we
need to.
But that should cost too much I think
--
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]