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

   ### Apache Airflow version
   
   Other Airflow 3 version (please specify below)
   
   ### If "Other Airflow 3 version" selected, which one?
   
   3.1.3
   
   ### What happened?
   
   We call delete on the dag run endpoint of the airflow REST api for two dag 
run ids from within a task.
   The API returns 204 successfully.
   
   One dag run was in state "queued" and got deleted. The other dag run was in 
state "running" and thus was not deleted. In both cases the return status is 
204.
   
   ### What you think should happen instead?
   
   If attempting to delete a dag run that is not in `DAGRunPatchStates`, 
indicate in the response that the delete request was denied / could not be 
performed instead of giving the impression to users that the delete was 
performed successfully.
   
   ### How to reproduce
   
   Run a dag. Note the run id. Try to call delete on the dag run endpoint while 
the dag run is still in the "running" state.
   
   ### Operating System
   
   Debian
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   Astro Runtime 3.1-5; k8s
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit 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