karenbraganz commented on issue #48694:
URL: https://github.com/apache/airflow/issues/48694#issuecomment-2777191815

   Hi @Yuvraj-Dhepe ,
   
   From my understanding, the trigger rules here are working as expected. 
Trigger rules will evaluate whether a task should be run based on the state of 
the task(s) directly upstream to it. Tasks have the `all_success` trigger rule 
unless you explicitly apply a different trigger rule.
   
   Here, you have described scenarios where you have applied different trigger 
rules to approval_task. Am I understanding this correctly? 
   
   The applied trigger rules will evaluate whether the approval_task should run 
based only on the state of the directly upstream task, which is python_task in 
this case. 
   
   - Since approval_task has only 1 directly upstream task (python_task), all 
success & one_success will have the same effect. approval_task will only run if 
python_task succeeds. Similarly, with the all_failed & one_failed trigger 
rules, approval_task will run only if python_task fails. Since the python_task 
is skipped here, none of these conditions will be met, so approval_task will 
also be skipped.
   - With none_failed, approval_task will run as long as python_task completes 
in a non-failed state like success or skipped. With all_done, approval_task 
will run as long as python_task completes execution. Both of these conditions 
are met, so you see approval_task running with either of these trigger rules.
   - With none_skipped, approval_task will run as long as python_task does not 
get skipped (irrespective of whether python_task fails or succeeds). Since 
python_task gets skipped, approval_task also gets skipped.
   - Lastly, since the end task has the default trigger rule of all_success, it 
will only run if approval_task succeeds. If approval_task gets skipped, the 
skipped state will also cascade down to the end task.
   
   Hope this clears things up.


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