jsjasonseba commented on issue #49135:
URL: https://github.com/apache/airflow/issues/49135#issuecomment-2798789424

   Hi @tirkarthi and @vatsrahul1001, I have identified the root cause of the 
issue. It is caused by the frontend logic where it gets a list of DAG from 
`api/v2/dags?limit=100&offset=0&order_by=-last_run_start_date`. However, since 
this API does not offer information about last DAG run, another call is needed 
which  is `/ui/dags/recent_dag_runs?dag_runs_limit=14&limit=100&offset=100`. 
Then, a join is performed on frontend side. 
   
   However, the recent_dag_runs call does not follow the ordering of the dag 
list call. So, what ends up happening is, by default dag list call is ordered 
by last run start date (it fetches top 100 DAG ordered by last run start date), 
and the recent dag run call always orders by last run run_after (fetches top 
100 DAG with last run run_after), so it ends up returning different set of DAGs 
and the join have missing last run.


-- 
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]

Reply via email to