Repository navigation
Support Taskflow-like syntax in the Go SDK #66937
Copy link
Copy link
Closed
Labels
go-sdkLabel to track work items for golang task sdkLabel to track work items for golang task sdkkind:featureFeature RequestsFeature Requestspriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release
Milestone
Description
Background
Today a Go task function takes ctx, an sdk.Client / sdk.VariableClient,
and a *slog.Logger, and pulls XCom data explicitly:
// go-sdk/example/bundle/main.go
func transform(ctx context.Context, client sdk.VariableClient, log *slog.Logger) error {
val, err := client.GetVariable(ctx, "my_variable")
...
}Java has just landed Taskflow-style task signatures under #66332, where
the upstream task's return value is declaratively injected into the
downstream task's parameter list rather than pulled via the client. We
want the same shape in Go so authors can write:
func extract(ctx context.Context) (SomeType, error) { ... }
func transform(ctx context.Context, upstream SomeType) error { ... }What needs to happen
- Decide how to declare task-to-parameter wiring in
Registry.AddTask
(doesdepends []stringcarry positional binding, or do we use typed
task handles returned byAddTask?). - Use reflection in
bundlev1.NewTaskFunctionto recognise an extra
typed parameter and treat it as an XCom pull from the named upstream. - Serialise the binding into the Dag JSON in coordinator-mode so the
supervisor knows which XCom to feed in. - Update
example/bundle/main.goto a Taskflow-style example.
Acceptance criteria
- A Go task can declare an upstream-typed parameter and receive the
upstream's return value at execution time without calling
client.GetXComexplicitly. - Serialisation matches what the Python supervisor expects for a
Taskflow-wired Dag (validated againsttest_dags.yaml). - The existing client-pull pattern remains supported.
Context
- Java parallel: Support Taskflow in Java SDK #66332 (Done).
@task.stubargument-passing groundwork: Make@task.stubable to pass argument #66330 (Done).- Same area as task dependency representation: Improve Task Dependency Representation #66331.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
go-sdkLabel to track work items for golang task sdkLabel to track work items for golang task sdkkind:featureFeature RequestsFeature Requestspriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release
Type
Projects
- StatusShow more project fieldsDone
Activity
uranusjr commentedon Jun 15, 2026
Removed from 3.3 milestone since (non-Python) SDKs have their own release cycles.
jason810496 commentedon Sep 17, 2026
Settled down the design in #72043.