You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jason810496 (via GitHub)" <gi...@apache.org> on 2026/05/14 11:50:29 UTC

[I] Support Taskflow-like syntax in the Go SDK [airflow]

jason810496 opened a new issue, #66937:
URL: https://github.com/apache/airflow/issues/66937

   ### Background
   
   Today a Go task function takes `ctx`, an `sdk.Client` / `sdk.VariableClient`,
   and a `*slog.Logger`, and pulls XCom data explicitly:
   
   ```go
   // 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:
   
   ```go
   func extract(ctx context.Context) (SomeType, error) { ... }
   func transform(ctx context.Context, upstream SomeType) error { ... }
   ```
   
   ### What needs to happen
   
   1. Decide how to declare task-to-parameter wiring in `Registry.AddTask`
      (does `depends []string` carry positional binding, or do we use typed
      task handles returned by `AddTask`?).
   2. Use reflection in `bundlev1.NewTaskFunction` to recognise an extra
      typed parameter and treat it as an XCom pull from the named upstream.
   3. Serialise the binding into the Dag JSON in coordinator-mode so the
      supervisor knows which XCom to feed in.
   4. Update `example/bundle/main.go` to 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.GetXCom` explicitly.
   - Serialisation matches what the Python supervisor expects for a
     Taskflow-wired Dag (validated against `test_dags.yaml`).
   - The existing client-pull pattern remains supported.
   
   ### Context
   
   - Java parallel: #66332 (Done).
   - `@task.stub` argument-passing groundwork: #66330 (Done).
   - Same area as task dependency representation: #66331.
   
   ---
   Drafted-by: Claude Code (Opus 4.7) (no human review before posting)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Support Taskflow-like syntax in the Go SDK [airflow]

Posted by "jason810496 (via GitHub)" <gi...@apache.org>.
jason810496 closed issue #66937: Support Taskflow-like syntax in the Go SDK
URL: https://github.com/apache/airflow/issues/66937


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Support Taskflow-like syntax in the Go SDK [airflow]

Posted by "jason810496 (via GitHub)" <gi...@apache.org>.
jason810496 commented on issue #66937:
URL: https://github.com/apache/airflow/issues/66937#issuecomment-5708250650

   Settled down the design in https://github.com/apache/airflow/pull/72043.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Support Taskflow-like syntax in the Go SDK [airflow]

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on issue #66937:
URL: https://github.com/apache/airflow/issues/66937#issuecomment-4706912706

   Removed from 3.3 milestone since (non-Python) SDKs have their own release cycles.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org