Skip to content

Conversation

@sunank200
Copy link
Collaborator

Operator extra links were not appearing in the UI for failed tasks in Airflow 3, which was a regression from Airflow 2 behaviour.

Root Cause

The finalize() function calls get_link() for each operator extra link without exception handling. If get_link() raises an exception (e.g., when accessing xcoms that don't exist for failed tasks), the entire loop stops and no xcoms are pushed.

Fix

Added exception handling around get_link() calls so that:

  • Exceptions in one link don't prevent other links from being pushed
  • Links are now available for failed tasks, matching Airflow 2 behavior

Fixes #57545


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@sunank200 sunank200 force-pushed the fix-operator-extra-links-failed-tasks branch 2 times, most recently from e930cbc to 6e657fd Compare November 12, 2025 11:48
@sunank200 sunank200 marked this pull request as ready for review November 12, 2025 11:48
@phanikumv phanikumv requested review from Lee-W and uranusjr November 19, 2025 06:52
@phanikumv phanikumv added this to the Airflow 3.1.4 milestone Nov 19, 2025
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly good, a few nits

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, i didn't think this would be the source. One nit and comments from Wei

@sunank200 sunank200 requested a review from Lee-W November 19, 2025 17:12
@sunank200 sunank200 force-pushed the fix-operator-extra-links-failed-tasks branch from cc93589 to c00df8a Compare November 19, 2025 17:13
@Lee-W Lee-W added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Nov 20, 2025
@Lee-W Lee-W merged commit 302bb4f into apache:main Nov 20, 2025
84 checks passed
@Lee-W Lee-W deleted the fix-operator-extra-links-failed-tasks branch November 20, 2025 01:14
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
…58227)

(cherry picked from commit 302bb4f)

Co-authored-by: Ankit Chaurasia <8670962+sunank200@users.noreply.github.com>
@github-actions
Copy link

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Nov 20, 2025
…pache#58227)

(cherry picked from commit 302bb4f)

Co-authored-by: Ankit Chaurasia <8670962+sunank200@users.noreply.github.com>
Lee-W pushed a commit that referenced this pull request Nov 20, 2025
…58227) (#58508)

Co-authored-by: Ankit Chaurasia <8670962+sunank200@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Nov 20, 2025
…58227) (#58508)

Co-authored-by: Ankit Chaurasia <8670962+sunank200@users.noreply.github.com>
aaron-wolmutt pushed a commit to aaron-wolmutt/airflow that referenced this pull request Nov 20, 2025
ephraimbuddy pushed a commit that referenced this pull request Dec 3, 2025
…58227) (#58508)

Co-authored-by: Ankit Chaurasia <8670962+sunank200@users.noreply.github.com>
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
itayweb pushed a commit to itayweb/airflow that referenced this pull request Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:task-sdk backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airflow 3 operator_extra_links do not appear on failed tasks

4 participants