kaxil commented on PR #72424:
URL: https://github.com/apache/airflow/pull/72424#issuecomment-5940856282

   What's the case `on_task_instance_failed` doesn't cover? By the time it 
fires for a retry, the task instance's state is already `UP_FOR_RETRY`, in both 
the scheduler path (`fetch_handle_failure_context` sets it before 
`notify_failure`) and the task runner (`finalize` calls the hook from its 
`UP_FOR_RETRY` branch). So an alerting listener can skip retries by checking 
`task_instance.state`, and Dag authors also have `on_retry_callback`. A new 
hookspec is permanent public surface for every listener implementation. Is 
there a listener that can't use the state check? Converting to draft until 
there is.
   


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