The GitHub Actions job "Tests (AMD)" on airflow.git/v3-3-test has succeeded.
Run started by GitHub user eladkal (triggered by Lee-W).

Head commit for run:
afeb272449595b770e87a271fa860135ed37b86b / github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
[v3-3-test] Fix scheduler firing on_failure_callback for heartbeat-timed-out 
retries (#66767) (#69824)

When a worker stops heartbeating (OOMKill, node eviction), the scheduler's
``_purge_task_instances_without_heartbeats`` built a ``TaskCallbackRequest``
without ``task_callback_type``. The Dag processor's task-callback dispatch
branches on that field: ``UP_FOR_RETRY`` runs ``on_retry_callback``, anything
else (including ``None``) runs ``on_failure_callback``. So heartbeat-timeout
cleanup always fired ``on_failure_callback`` even when the task still had
retries remaining, producing spurious failure alerts for tasks that
ultimately succeeded on retry.

Set ``task_callback_type`` from ``ti.is_eligible_to_retry()``, the canonical
retry-eligibility predicate, guarded by ``max_tries > 0``. The guard covers
the one gap the predicate has here: this path doesn't load ``ti.task``, so the
predicate falls back to ``try_number <= max_tries`` and drops the
retries-configured check its task-loaded branch applies. Deferring to the
predicate also keeps a ``RESTARTING`` task (cleared while running) retry-
eligible past ``max_tries``, where a hand-rolled ``try_number <= max_tries``
check would have fired ``on_failure_callback``.

closes: #65400
(cherry picked from commit f2403ccb58b32ae9a073b70d6648c11447d6c9b0)

Signed-off-by: 1fanwang <[email protected]>
Co-authored-by: Stefan Wang <[email protected]>
Co-authored-by: kimhaggie <[email protected]>

Report URL: https://github.com/apache/airflow/actions/runs/29250937848

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to