airflow icon indicating copy to clipboard operation
airflow copied to clipboard

AIP-84 | Add last run details to dags list

Open bbovenzi opened this issue 1 year ago • 3 comments

Add the latest dag run to the returned dag in the public get /dags endpoint in fastapi.

dag.latest_dagrun should be a serialized DagRun or None

bbovenzi avatar Oct 04 '24 11:10 bbovenzi

Can you please assign it to me?

ArshiaZr avatar Oct 04 '24 21:10 ArshiaZr

Thanks @ArshiaZr Instead of listing a few separate columns of the dag run. We should probably just return dag.last_dagrun as a dict of the DagRun model.

bbovenzi avatar Oct 07 '24 11:10 bbovenzi

@ArshiaZr this is the issue to add last_dagrun to the fast api dags list. So please feel free to work on it!

bbovenzi avatar Oct 15 '24 16:10 bbovenzi

Hello @ArshiaZr,

Are you still working on it? Do you need help to get started?

pierrejeambrun avatar Nov 28 '24 09:11 pierrejeambrun

Closing. We are now using the private endpoint for recent_dag_runs which has more information.

pierrejeambrun avatar Nov 29 '24 15:11 pierrejeambrun

The PR was stale and closed. It's probably good to reopen this issue and have the latest dagrun as part of the dag response which is more efficient and useful in pages like dag detail instead of fetching last 14 dagruns and getting the last item.

Edit : Please ignore my comment. It seems the endpoint has dag_runs_limit to limit the dagruns to latest and also achieve my use case. Thanks.

tirkarthi avatar Dec 03 '24 13:12 tirkarthi