Do not dilute task failures with finalization errors during execution#62070
Merged
Conversation
kaxil
reviewed
Feb 17, 2026
sunank200
approved these changes
Feb 17, 2026
potiuk
approved these changes
Feb 17, 2026
pankajkoti
approved these changes
Feb 18, 2026
Member
pankajkoti
left a comment
There was a problem hiding this comment.
LGTM. Thanks a lot @amoghrajesh for fixing this so quickly 🙇🏽
vatsrahul1001
approved these changes
Feb 18, 2026
Contributor
Backport failed to create: v3-1-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 5af913d v3-1-testThis should apply the commit to the v3-1-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
Contributor
Author
|
Manual cherry pick here: #62113 |
amoghrajesh
added a commit
that referenced
this pull request
Feb 18, 2026
sjyangkevin
pushed a commit
to sjyangkevin/airflow
that referenced
this pull request
Feb 18, 2026
choo121600
pushed a commit
to choo121600/airflow
that referenced
this pull request
Feb 22, 2026
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Mar 4, 2026
vatsrahul1001
pushed a commit
that referenced
this pull request
Mar 4, 2026
dominikhei
pushed a commit
to dominikhei/airflow
that referenced
this pull request
Mar 11, 2026
Ankurdeewan
pushed a commit
to Ankurdeewan/airflow
that referenced
this pull request
Mar 15, 2026
2 tasks
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.
Was generative AI tooling used to co-author this PR?
Why and Fix
When a task with
overwrite_rtif_after_execution=Truefails, the finalize() function attempts to update RTIF via the execution API. If this API call fails (e.g., 404 Not Found due to timing issues or whatever reasons), the error propagates and masks the original task failure error.This causes users to see "AirflowRuntimeError: API_SERVER_ERROR" instead of their actual task error , making it confusing to narrow down the issue while debugging.
The fix is to wrap the
SetRenderedFieldscall in a error handling block, consistent with how operator extra links xcoms pushes are handled in the same function. Errors are now logged but don't prevent finalization from completing ormask the original task error.
If you undo changes in the
task_runnerfile, you can see the error like this:But that error doesn't show up with the fix which is TLDR of the PR.
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.