Repository navigation
Go SDK: Fix the mixed language task handler binding semantic - #73648
Merged
jason810496 merged 6 commits intoSep 29, 2026
Merged
jason810496 merged 6 commits into
jason810496 merged 6 commits into
Conversation
jason810496
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jscheffl and
potiuk
as code owners
September 24, 2026 08:12
1 task done
FrankYang0529
approved these changes
Sep 26, 2026
FrankYang0529
left a comment
Member
There was a problem hiding this comment.
Overall LGTM. Thanks for the fix.
jason810496
force-pushed
the
fix/go-sdk/struct-arg-binding-strictness
branch
from
September 27, 2026 14:42
3532d9a to
5286547
Compare
henry3260
approved these changes
Sep 29, 2026
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.
Why
Sole-struct binding fails the task when an argument no field claims arrives, but silently zero-fills a field no argument supplies. Nothing checks the stub signature against the Go one, so both are the same kind of mismatch, and neither is worth failing a run over when fields bind by name.
How
Fields bind by name like keyword arguments, so neither direction shifts anything the handler reads. Both are now logged before the task runs, and the task runs. A call can be wrong both ways at once, so each direction is its own message:
Dag's call passed argument(s) the task handler does not declareTask handler declares argument(s) the Dag's call did not passThe same two strings are used by every lang SDK, so one query finds them across languages. Captured defaults are not reported, as before.
Unchanged: flat positional bindings still fail either way, because a dropped or added positional argument shifts every later one.
A spec that arrives empty is treated as every field unfilled, since that is what an argless call like
my_task()sends, so it is warned about and the task runs.What
pkg/binding: the rules above, plus a log-capturing test helper.adr/0006andREADME.md: both stated the old behavior. The README is whatgo.rstpoints users to for the full binding rules.airflow-core/adr/lang-sdk/0007: states the rule for every SDK, since the spec describes the stub signature and nothing checks it against the foreign handler's. Positional fails either way, named logs either way, and how much each runtime can see is a language difference rather than a rule difference.example/bundle/taskflowbinding: two new example tasks, one per direction, both asserted end to end inairflow-e2e-tests.via_struct_more_argsis passed an argument its struct does not declare;via_struct_fewer_argsdeclares a field the stub has no parameter for and keeps its Go zero value.ViaStructUnmatchedArgis also renamedViaStructDefaultArg, since it now only demonstrates a captured default no field claims.Was generative AI tooling used to co-author this PR?