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

   ### Apache Airflow version
   
   main (development)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   If a dag_run is marked failed before a task which has trigger rule as 
`all_done` then it will automatically bring the dag_run back to running state 
and will run the task with trigger rule `all_done`.
   
   
   
https://github.com/user-attachments/assets/ad934322-ff4f-4aa5-b47a-8d08aaaf9065
   
   
   
   ### What you think should happen instead?
   
   Failing dag_run from UI should be absolute. The dag_run should not come to 
running state on its own until unless cleared.
   
   ### How to reproduce
   
   With the below simple DAG, when the tasks 1,2 & 3 are running mark the 
**`dag_run`** as failed.
   Wait for a few seconds and refresh the WebUI and you'll notice that the 
final_task comes running.
   
   ```
   from airflow.decorators import dag, task
   import pendulum
   import time
   
   @dag(
       dag_id='trigger_rule_demo',
       schedule=None,
       start_date=pendulum.datetime(2024, 1, 1),
       catchup=False,
       default_args={'retries': 0}
   )
   def trigger_rule_showcase():
       
       @task
       def task_1():
           time.sleep(30)
           return "Task 1 done"
       
       @task
       def task_2():
           time.sleep(45)
           return "Task 2 done"
       
       @task
       def task_3():
           time.sleep(60)
           return "Task 3 done"
       
       @task(trigger_rule='all_done')
       def final_task():
           return "Final task done"
   
       [task_1(), task_2(), task_3()] >> final_task()
   
   dag = trigger_rule_showcase()
   ```
   
   ### Operating System
   
   ProductName:            macOS ProductVersion:         15.0.1 BuildVersion:   
        24A348
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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