pierrejeambrun commented on code in PR #45420:
URL: https://github.com/apache/airflow/pull/45420#discussion_r1906847776
##########
airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -82,8 +93,25 @@ def get_dags(
session: SessionDep,
) -> DAGCollectionResponse:
"""Get all DAGs."""
+ dag_runs_select, total_entries = paginated_select(
+ statement=select(DagRun),
+ filters=[
+ dag_run_start_date_range,
+ dag_run_end_date_range,
+ dag_run_state,
+ ],
+ session=session,
+ )
+
dags_select, total_entries = paginated_select(
- statement=dags_select_with_latest_dag_run,
+ statement=generate_dag_select_query(
Review Comment:
I think we should do that the other way around. First `generate` the base
query with `generate_dag_select_query`. Then give it to the `paginated_select`
wrapper. That will avoid having another base select `select(DagRun)` to provide
to the paginated_select, and having the `stmt` arg in
`generate_dag_select_query`
--
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]