1fanwang commented on issue #65400:
URL: https://github.com/apache/airflow/issues/65400#issuecomment-4438073754

   A clarification on the mechanism: the Dag processor's task-callback dispatch 
is a direct branch on `task_callback_type`, not via `is_failure_callback`:
   
   ```python
   # airflow-core/src/airflow/dag_processing/processor.py
   if request.task_callback_type is TaskInstanceState.UP_FOR_RETRY:
       callbacks = task.on_retry_callback
   else:
       callbacks = task.on_failure_callback
   ```
   
   `is_failure_callback` actually returns `True` for `UP_FOR_RETRY` too, and 
isn't queried on this path — so the bug isn't mediated by that property. It's 
that `_purge_task_instances_without_heartbeats` never sets 
`task_callback_type`, so it stays `None` and the `else` branch always runs.
   
   Fix in #66767 (picking up from #65404 — reproducer + tests in the PR 
description).


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