This is an automated email from the ASF dual-hosted git repository.
vatsrahul1001 pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 444cda95f70efb64523a2faa9e4de0e433b52310
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Aug 10 16:54:02 2026 +0200
[v3-3-test] Fix Grid view failing to load large Dags on MySQL (#71342)
(#71370)
* Fix Grid view failing to load large Dags on MySQL
* Remove unnecessary comment
(cherry picked from commit fe5107f1f8d322b2bd577d847cfccdfd322f1788)
Co-authored-by: WonYong Jang <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
---
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py
b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py
index d23355f505e..7622b13bff0 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py
@@ -80,14 +80,7 @@ grid_router = AirflowRouter(prefix="/grid", tags=["Grid"])
def _get_latest_serdag(dag_id, session):
- serdag = session.scalar(
- select(SerializedDagModel)
- .where(
- SerializedDagModel.dag_id == dag_id,
- )
- .order_by(SerializedDagModel.id.desc())
- .limit(1)
- )
+ serdag =
session.scalar(SerializedDagModel.latest_item_select_object(dag_id))
if not serdag:
raise HTTPException(
status.HTTP_404_NOT_FOUND,