reganbaum opened a new issue, #40600:
URL: https://github.com/apache/airflow/issues/40600

   ### Description
   
   Today, stopping the execution of a DAG run requires 2 REST API calls: one to 
identify non-completed tasks of a run, and another to mark those tasks as 
failed. This has the potential of running into race conditions, where tasks 
could complete between the two API calls, leading to tasks being marked as 
failed when they may have succeeded. Ideally, there is a single REST API that 
handles stopping the execution of a DAG run. The UI does this today by invoking 
the endpoint `/dagrun_failed`. The goal is to have a REST API endpoint 
available that stops a DAG run at `/api/v1/dagrun_failed`.
   
   ### Use case/motivation
   
   I would like to programmatically stop a running workflow, which actually 
stops the execution (not just changes the state in the database).
   
   ### Related issues
   
   https://github.com/apache/airflow/issues/40594 (The `dagrun_failed` issue 
was originally combined with the `dag_stats` issue, but separated it out into 
its own issue for clearer tracking)
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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