Skip to content

[v3-4-test] Go SDK: fail a task whose return-value XCom push fails (#75443) - #75476

Merged
jason810496 merged 1 commit into
v3-4-testfrom
backport-1a50a18-v3-4-test
Oct 23, 2026
Merged

jason810496 merged 1 commit into
v3-4-testfrom
backport-1a50a18-v3-4-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor
  • Go SDK: fail a task whose return-value XCom push fails, fix the Label doc

A failed return-value push was logged and the task was left successful, so the
downstream tasks that read it failed later with XComNotFound. Fail the task
instead, and stop pushing a result the task never produced when its function
already returned an error, as the branch path does.

The guide's labelled-edge example did not compile: Label takes only the text,
and On names the tasks its edges reach.

  • Go SDK: address review on the return-value XCom push

Push the task instance from the runtime context as is, share its lookup
with startBranch, and cover the failed push on the branch path. Merge the
copied test helper into runTask.

  • Go SDK: test that a task pushes no nil-pointer return value

Only the branch path covered this check, and a nil pointer that slipped
past it would be pushed as null now that a push can fail the task.


(cherry picked from commit 1a50a18)

Co-authored-by: Jason(Zhe-You) Liu 68415893+jason810496@users.noreply.github.com

…75443)

* Go SDK: fail a task whose return-value XCom push fails, fix the Label doc

A failed return-value push was logged and the task was left successful, so the
downstream tasks that read it failed later with XComNotFound. Fail the task
instead, and stop pushing a result the task never produced when its function
already returned an error, as the branch path does.

The guide's labelled-edge example did not compile: Label takes only the text,
and On names the tasks its edges reach.

* Go SDK: address review on the return-value XCom push

Push the task instance from the runtime context as is, share its lookup
with startBranch, and cover the failed push on the branch path. Merge the
copied test helper into runTask.

* Go SDK: test that a task pushes no nil-pointer return value

Only the branch path covered this check, and a nil pointer that slipped
past it would be pushed as null now that a push can fail the task.

---------
(cherry picked from commit 1a50a18)

Co-authored-by: Jason(Zhe-You) Liu <68415893+jason810496@users.noreply.github.com>
@jason810496 jason810496 added this to the Airflow 3.4.0 milestone Oct 23, 2026
@jason810496
jason810496 merged commit 9d0f566 into v3-4-test Oct 23, 2026
65 of 77 checks passed
@jason810496
jason810496 deleted the backport-1a50a18-v3-4-test branch October 23, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant