You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
…med-out retries (#66767)
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 f2403cc)
Co-authored-by: Stefan Wang <1fannnw@gmail.com>
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Co-authored-by: kimhaggie <kimhaggie@gmail.com>
Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.1 based on: bug fix merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.
…med-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 f2403cc)
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Co-authored-by: Stefan Wang <1fannnw@gmail.com>
Co-authored-by: kimhaggie <kimhaggie@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a worker stops heartbeating (OOMKill, node eviction), the scheduler's
_purge_task_instances_without_heartbeatsbuilt aTaskCallbackRequestwithout
task_callback_type. The Dag processor's task-callback dispatchbranches on that field:
UP_FOR_RETRYrunson_retry_callback, anythingelse (including
None) runson_failure_callback. So heartbeat-timeoutcleanup always fired
on_failure_callbackeven when the task still hadretries remaining, producing spurious failure alerts for tasks that
ultimately succeeded on retry.
Set
task_callback_typefromti.is_eligible_to_retry(), the canonicalretry-eligibility predicate, guarded by
max_tries > 0. The guard coversthe one gap the predicate has here: this path doesn't load
ti.task, so thepredicate falls back to
try_number <= max_triesand drops theretries-configured check its task-loaded branch applies. Deferring to the
predicate also keeps a
RESTARTINGtask (cleared while running) retry-eligible past
max_tries, where a hand-rolledtry_number <= max_triescheck would have fired
on_failure_callback.closes: #65400
(cherry picked from commit f2403cc)
Co-authored-by: Stefan Wang 1fannnw@gmail.com
Signed-off-by: 1fanwang 1fannnw@gmail.com
Co-authored-by: kimhaggie kimhaggie@gmail.com