MAHESH-HASBI opened a new issue #16412:
URL: https://github.com/apache/airflow/issues/16412


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the 
following questions.
   Don't worry if they're not all applicable; just try to include what you can 
:-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   **Description**
   
   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.
   
   <!-- What do you want to happen?
   
   Rather than telling us how you might implement this solution, try to take a
   step back and describe what you are trying to achieve.
   
   -->
   
   **Are you willing to submit a PR?**
   
   No, I'm not willing to contribute.
   
   **Related Issues**
   
   <!-- Is there currently another issue associated with this? -->
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to