When using the newest Airflow version (2.4.2), the on_failure_callback doesnt get triggered on KubernetesPodOperator tasks. The on_success_callback works just fine.
For each KubernetesPodOperator task I set on_success_callback=send_success_notification() and on_failure_callback=send_failure_notification().
If the task succeeds, the notification gets send. However, in case of failure, the on_failure_callback doesn't get triggered. Is this some bug related to newest version?
I know it's a late answer but there's a mistake or typo in the examples:
Both the send_success_notification() and send_failure_notification() should be a reference to the function, not a function call. What I mean is you need to drop the brackets
()
from the end like:on_success_callback=send_success_notification
andon_failure_callback=send_failure_notification