Repository navigation
Go SDK: fail a task whose return-value XCom push fails - #75443
Merged
Merged
Conversation
… 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. Co-Authored-By: Claude <noreply@anthropic.com>
uranusjr
reviewed
Oct 23, 2026
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. Co-Authored-By: Claude <noreply@anthropic.com>
phanikumv
reviewed
Oct 23, 2026
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. Co-Authored-By: Claude <noreply@anthropic.com>
phanikumv
approved these changes
Oct 23, 2026
Contributor
Backport successfully created: v3-4-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
jason810496
added a commit
that referenced
this pull request
Oct 23, 2026
…75443) (#75476) * 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>
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.
Final nit before the Go SDK beta release.
A failed return-value XCom push no longer leaves the task successful
The return-value push logged the error and returned nothing, so the task finished successful
and its downstream tasks failed later with
XComNotFound. It now returns theerror and fails the task.
A task whose function already returned an error also stops pushing its result:
that result is the zero value, not one the task produced. The branch path
already worked this way.
The guide's labelled-edge example did not compile
Labeltakes only the text, andOnnames the tasks its edges reach.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines