Skip to content

Commit a7f23af

Browse files
github-actions[bot]WonYong-Jangvatsrahul1001
authored
[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 fe5107f) Co-authored-by: WonYong Jang <zcx5674@gmail.com> Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
1 parent 1e0ca1e commit a7f23af

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

  • airflow-core/src/airflow/api_fastapi/core_api/routes/ui

airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,7 @@
8080

8181

8282
def _get_latest_serdag(dag_id, session):
83-
serdag = session.scalar(
84-
select(SerializedDagModel)
85-
.where(
86-
SerializedDagModel.dag_id == dag_id,
87-
)
88-
.order_by(SerializedDagModel.id.desc())
89-
.limit(1)
90-
)
83+
serdag = session.scalar(SerializedDagModel.latest_item_select_object(dag_id))
9184
if not serdag:
9285
raise HTTPException(
9386
status.HTTP_404_NOT_FOUND,

0 commit comments

Comments
 (0)