dstandish commented on PR #50984:
URL: https://github.com/apache/airflow/pull/50984#issuecomment-2914270383

   > I didn't dive too deep, but `generate_dag_with_latest_run_query` is also 
using a `latest_dag_run_per_dag_id_cte` that seems worong, most likely also has 
the problem (joining over dag_run latest date, but actually multiple run with 
the same start date can happen, resulting in multiple rows per Dag which is not 
handled).
   > 
   > ```python
   >     latest_dag_run_per_dag_id_cte = (
   >         select(DagRun.dag_id, 
func.max(DagRun.start_date).label("start_date"))
   >         .where()
   >         .group_by(DagRun.dag_id)
   >         .cte()
   >     )
   > ```
   
   Right this function is wrong -- but I am not touching that one here -- one 
at a time.


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