jason810496 commented on code in PR #54823:
URL: https://github.com/apache/airflow/pull/54823#discussion_r2293174662
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py:
##########
@@ -217,16 +218,7 @@ def get_grid_runs(
) -> list[GridRunsResponse]:
"""Get info about a run for the grid."""
# Retrieve, sort the previous DAG Runs
- base_query = select(
- DagRun.dag_id,
- DagRun.run_id,
- DagRun.queued_at,
- DagRun.start_date,
- DagRun.end_date,
- DagRun.run_after,
- DagRun.state,
- DagRun.run_type,
- ).where(DagRun.dag_id == dag_id)
+ base_query =
select(DagRun).options(joinedload(DagRun.dag_model)).where(DagRun.dag_id ==
dag_id)
Review Comment:
Not sure if selecting all fields of `DagRun` model will introduce long
loading time for Gride View or not?
As [Grid view optimization
#51805](https://github.com/apache/airflow/pull/51805) only select necessary
fields for this route.
_Maybe_ there isn't large difference, but it would be nice to have a small
benchmark to find out.
--
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]