apache/airflow

Expose an API which can return dagRun status in most optimized time

Ouverte

#27 782 ouverte le 18 nov. 2022

 (9 commentaires) (1 réaction) (0 personne assignée)Python (16 781 forks)batch import
area:APIgood first issuekind:feature

Métriques du dépôt

Stars
 (44 809 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

Description

Airflow/MWAA does not seem to have any scalable API for returning the status of a dagRun, the APIs states-for-dag-run or list-runs are not scaling well. To fetch the dagRun status, every team seems to have some custom solution using sns_notification or updating the status to some external data store via Airflow callbacks.

The ask is to expose an API which can return dagRun status in most optimized time/by an internal query operation and not a scan.

Discussion https://github.com/apache/airflow/discussions/27765

Use case/motivation

My use case is to fetch the Dag status of all the Active runs and update the status tables in the system. There is a poller (with a timeout of 150s configured based on our SLA). The states-for-dag-run API seems to be doing scan operation internally. As the number of DAG runs in system increases, the time to get the status of dagRun increases further. Initially, fetching the status of 100 runs took 2.5 minutes. With increase of dagRuns in the system by 50, the fetch operation to get status for 100 dagRuns is taking more than 5 minutes.

Related issues

NA

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Guide contributeur