You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "1fanwang (via GitHub)" <gi...@apache.org> on 2026/05/13 06:37:54 UTC
Re: [I] Scheduler heartbeat-timeout cleanup creates TaskCallbackRequest without task_callback_type, causing on_failure_callback to fire while retries remain [airflow]
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org