Report a retried Databricks task once, from its last attempt - #72313
Merged
eladkal merged 1 commit intoSep 9, 2026
Merged
Conversation
A run carries one entry per task attempt, so the failure list that reaches a task's error message repeated a retried task once per attempt, and it also listed tasks that had failed on an earlier attempt but succeeded on the retry. Only the outcome of the last attempt describes what happened.
1 task
Contributor
Author
|
@eladkal could you take a look when you have a moment, or point it at whoever is better placed? A run carries one entry per task attempt, so a retried task is reported once per attempt, and a task that failed on an earlier attempt but succeeded on the retry is still reported as failed. Green, and verified against a live workspace. Note that #70385 edits the same two lines, so whichever lands second needs a trivial rebase. Drafted-by: Claude Code (Opus 5); reviewed by @moomindani before posting |
eladkal
approved these changes
Sep 9, 2026
imrichardwu
pushed a commit
to imrichardwu/airflow
that referenced
this pull request
Sep 11, 2026
…72313) A run carries one entry per task attempt, so the failure list that reaches a task's error message repeated a retried task once per attempt, and it also listed tasks that had failed on an earlier attempt but succeeded on the retry. Only the outcome of the last attempt describes what happened.
xvega
pushed a commit
to xvega/airflow
that referenced
this pull request
Sep 13, 2026
…72313) A run carries one entry per task attempt, so the failure list that reaches a task's error message repeated a retried task once per attempt, and it also listed tasks that had failed on an earlier attempt but succeeded on the retry. Only the outcome of the last attempt describes what happened.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A Databricks run carries one entry per task attempt.
extract_failed_task_errors[_async]walked every entry, so the failure list that ends up in a task's error message (operators/databricks.py:159, and the trigger event on the deferrable path) had two problems:get_run_outputwas called once per attempt as wellBoth go away by keeping only the attempt with the highest
attempt_numberpertask_keybefore filtering for failures.The semantics I picked, in case anyone wants to argue for the other one: report the last attempt only. An earlier attempt's error does not describe the outcome of the task, and if the retry succeeded there is no failure to report at all. Deduplicating by
task_keywhile keeping the first entry would fix the duplication but keep reporting recovered tasks as failures.Verified against a live workspace, with a job whose single task always fails and carries
max_retries: 1:attempt_number0 and 1, bothFAILED, with different task run idsextract_failed_task_errorsreturns exactly one entry, carrying the last attempt's run idAll three new unit tests fail without the change, and the provider's unit suite passes with it.
related: #72304
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines