apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.77k stars 14.22k forks source link

AIP-84 Migrate /object/grid_data from views to FastAPI #42595

Open bugraoz93 opened 3 weeks ago

bugraoz93 commented 3 weeks ago

Description

Migrate views /object/grid_data to Fast API.

Use case/motivation

AIP-84

Related issues

Relates to: https://github.com/apache/airflow/issues/42366

Are you willing to submit a PR?

Code of Conduct

bbovenzi commented 2 weeks ago

I mentioned in the main epic how we want to refactor this endpoint. I think we can have graph_data handle all of the task order and structure as I mentioned in #42367. Then we can simplify grid_data to only include dag run history. Each dag run includes an array of all its task instances.

Also, it would be nice to calculate summaries of mapped tasks and task groups (determine the overall state, give a breakdown of counts of children states, determine earliest queued, earliest start_date and latest end_date).

By separting runs from the task structure we can add pagination and filtering to thedag_runs_with_task_summaries endpoint, then we can do stuff like only refresh on active dag runs.