karenbraganz commented on issue #48694: URL: https://github.com/apache/airflow/issues/48694#issuecomment-2795048730
@Yuvraj-Dhepe The logic behind trigger rules is to run tasks only if certain conditions are met. If those conditions are not met, the task will be skipped- not failed. Note that `approval_task` will not necessarily acquire the same state as `python_task` if the trigger rules are not met. Consider a scenario where `python_task` fails instead of being skipped. If the trigger rule for `approval_task` is `one_success` or `all_sucess`, then `approval_task` will be skipped since its only upstream task is in the failed state. Therefore, the skipped state of `approval_task` is not always the same as the upstream task. You can test this out by raising `AirflowFailException` instead of `AirflowSkipException` in `python_task`. I also want to emphasize that tasks enter the skipped state- not the failed state- if trigger rules are not met because Airflow will directly skip running these tasks. The failed state is appropriate if Airflow actually attempts to run the task but is not able to complete the task successfully. That is not the case here. -- 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]
