API for marking the running DAG state to success or failure
See original GitHub issueDescription
Like how we are able to turn OFF the DAG or turn ON the DAG using airflow API, we need a feature where we can mark the running DAG as FAILED or SUCCESS. This feature is needed for us.
I see two methods set_dag_run_state_to_failed
and set_dag_run_state_to_success
already present in code like how we want. It would be good if we have an API for it.
API’s something like below GET /api/experimental/dags/<DAG_ID>/dag_runs/string:execution_date/SUCCESS GET /api/experimental/dags/<DAG_ID>/dag_runs/string:execution_date/FAILED
Use case / motivation In my application, airflow DAGs are getting stuck in a running state for some reason, we want to mark them as FAILED or SUCCESS and trigger a fresh DAG run, and sometimes while the DAG is in running state we want to abort it based on some predefined conditions. Currently, we are doing this by using airflow UI but we want to use API instead.
Are you willing to submit a PR?
No, I’m not willing to contribute.
Related Issues
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11 (10 by maintainers)
Top GitHub Comments
Hi, I am willing to work on this as my first issue.
Closed by #17839