Skip to content

Go SDK: coordinator-protocol execution server and task runner#67154

Draft
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:refactor/go-sdk/coordinator-runtime
Draft

Go SDK: coordinator-protocol execution server and task runner#67154
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:refactor/go-sdk/coordinator-runtime

Conversation

@jason810496
Copy link
Copy Markdown
Member

@jason810496 jason810496 commented May 19, 2026

Why

The Go SDK bundle binary currently only speaks the go-plugin protocol
used by the Edge Worker. To let the same binary run under the
ExecutableCoordinator path on the Python side (per ADR 0003), the
bundle needs to be able to act as a coordinator-protocol server:
accept startup details from the supervisor over stdio, drive a task
through its lifecycle, and stream logs / comms frames back. This PR
adds that runtime as a new pkg/execution package and wires the
bundle server to invoke it.

How

  • New go-sdk/pkg/execution package implements the coordinator-side
    runtime: msgpack framing (frames.go), the message catalogue
    (messages.go), Airflow-shaped serialisation (serde.go), the
    comms decoder/encoder pair (comms.go), an stdio-backed logger
    (logger.go), a Client for outbound supervisor calls
    (client.go), the Server that owns the stdio loop (server.go),
    and a TaskRunner that drives a task from startup-details through
    to completion (task_runner.go).
  • dag_parser.go reuses the existing registry to enumerate DAGs/tasks
    for the supervisor without spawning the legacy go-plugin path.
  • Bundle plumbing: bundlev1server/server.go, bundlev1/registry.go,
    and bundlev1/task.go learn to hand a task off to the new runner;
    sdkcontext/keys.go exposes the new context keys; sdk/client.go
    and sdk/connection.go get the small adjustments required for the
    new entry path.

What

  • Add go-sdk/pkg/execution/{client,comms,dag_parser,frames,logger,messages,serde,server,task_runner}.go
    plus matching unit and integration tests.
  • Extend go-sdk/bundle/bundlev1/{bundlev1server/server.go,registry.go,task.go}
    to route coordinator-protocol invocations through the new runtime.
  • Add the sdkcontext keys consumed by the runner and small SDK
    client/connection tweaks.
  • Bump go.mod / go.sum for the new transport/codec dependencies.

Next


Was generative AI tooling used to co-author this PR?

- Add `messages_test.go` to test message decoding and encoding functionalities.
- Introduce `serde.go` for serialization of various data types to Airflow's format.
- Create `serde_test.go` to validate serialization logic and ensure correctness.
- Implement `server.go` to handle communication with the supervisor and manage task execution.
- Add `task_runner.go` to execute tasks based on received startup details and handle success/failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:go-sdk go-sdk Label to track work items for golang task sdk

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant