Skip to content

Go SDK: ADRs for bundle packing and coordinator-protocol runtime#67153

Draft
jason810496 wants to merge 5 commits into
apache:mainfrom
jason810496:refactor/go-sdk/adrs
Draft

Go SDK: ADRs for bundle packing and coordinator-protocol runtime#67153
jason810496 wants to merge 5 commits into
apache:mainfrom
jason810496:refactor/go-sdk/adrs

Conversation

@jason810496
Copy link
Copy Markdown
Member

@jason810496 jason810496 commented May 19, 2026

Why

Capture the design decisions behind the next slice of Go SDK work — how
bundles are packed, which packer mechanism we adopt, how the bundle
binary speaks the coordinator protocol, and how the artefact is
shipped. These ADRs are the contract the follow-up implementation PRs
build against, so they need to land first (and stand on their own as
documentation).

What

  • ADR 0001: register the post-build bundle-packing options for the Go
    SDK and pick the option set we'll deliver (standalone packer + Go
    1.24 tool directive + standardised --dump-bundle-spec).
  • ADR 0002: select the Go 1.24 tool directive as the delivery
    mechanism for the bundle packer; rationale for not vendoring a CLI
    or shipping a separate distribution.
  • ADR 0003: define the dual-mode bundle binary — a coordinator-protocol
    msgpack-over-IPC path alongside the existing go-plugin/Edge-Worker
    path — so the same binary can run under both task execution models.
  • ADR 0004: switch the bundle artefact to a self-contained executable
    with footer-embedded source and metadata; supersedes the ZIP-archive
    shape from ADRs 0001/0002 while keeping the same packer mechanism.

Next


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

@jason810496
Copy link
Copy Markdown
Member Author

The CI failure should be fixed after the dependent PRs get merged and rebase.

2. **Extend `bundlev1server.Serve` with `--dump-bundle-spec`.** The
flag prints a JSON document of the form:

```json
Copy link
Copy Markdown
Member Author

@jason810496 jason810496 May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could define the JSON schema of the airflow-metadata.yaml format either in this PR or the next one.

It was added in 478edab#diff-82337e6c6586f2c271a1457ae2f45acf563aa7b75ce82a78f163cf78690c91b4

3. **Bundle authors register the packer in their own `go.mod`:**

```
tool github.com/apache/airflow/go-sdk/cmd/airflow-go-pack
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release management issue is tracked in #66938

### Footer layout

A bundle file is laid out as:

Copy link
Copy Markdown
Member Author

@jason810496 jason810496 May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user-facing doc regarding the executable bundle spec was added in 478edab#diff-0f63500bac12820edd728da72331356b8546a8d571ed949df07a96e1085b835d

+---------------------------------+ <- EOF
```

`AFBNDL01` is `0x41 0x46 0x42 0x4E 0x44 0x4C 0x30 0x31`. The two
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AFBNDL01 magic represents Airflow BuNDLe version 01, we could change it to anything anyway.

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