← astronomer-dataCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to astronomer-data
Snapshot Sep 30, 2026 · 23:17 UTC · version 0.1.0
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"name": "deploying-go-sdk-bundles",
"description": "Builds, packs, and deploys compiled Airflow Go SDK bundles so the ExecutableCoordinator can run them. Use when the user wants to compile a Go task bundle, asks about `go build`, `go tool airflow-go-pack`, the AFBNDL01 self-contained executable bundle, packing or inspecting a bundle, placing it under `executables_root`, cross-compiling a bundle for workers, `go-sdk` module versioning/tags/pseudo-versions, or getting the bundle onto an Airflow worker (Docker, Kubernetes, or Astro). For the task code see authoring-go-sdk-tasks; for the shared coordinator settings see configuring-airflow-language-sdks.",
"included_files": [],
"skill_md_contents": "---\nname: deploying-go-sdk-bundles\ndescription: Builds, packs, and deploys compiled Airflow Go SDK bundles so the ExecutableCoordinator can run them. Use when the user wants to compile a Go task bundle, asks about `go build`, `go tool airflow-go-pack`, the AFBNDL01 self-contained executable bundle, packing or inspecting a bundle, placing it under `executables_root`, cross-compiling a bundle for workers, `go-sdk` module versioning/tags/pseudo-versions, or getting the bundle onto an Airflow worker (Docker, Kubernetes, or Astro). For the task code see authoring-go-sdk-tasks; for the shared coordinator settings see configuring-airflow-language-sdks.\n---\n\n# Deploying Go SDK Bundles\n\nA Go SDK deployment has one artifact: a **bundle**, a single self-contained native executable that also carries its embedded source and a manifest (the AFBNDL01 format, \"the executable *is* the bundle\"). You build and pack it with `go`, place it where Airflow's `ExecutableCoordinator` scans, and the Python task runner forks it once per task instance. This skill is platform-neutral: it shows the build, the coordinator wiring, then how to get the bundle onto a worker.\n\n> **Experimental.** The Go SDK is under active development and not production-ready. Everything resolves against the single module `github.com/apache/airflow/go-sdk` (Go 1.24+).\n\n> **Order of operations:** write the tasks (**authoring-go-sdk-tasks**) -> build and pack the bundle (this skill) -> place it under `executables_root` and configure the coordinator -> deploy the matching Python stub DAG.\n\n---\n\n## Build and pack the bundle\n\nThe coordinator only recognizes a **packed** bundle: it scans for the AFBNDL01 trailer and silently skips any file that lacks it, so a plain `go build` binary is not deployable on its own. Use the packer, shipped as a Go 1.24 `tool` directive in `go.mod` (no global install, version pinned per project):\n\n```bash\ngo tool airflow-go-pack ./example/bundle # build + pack in one step\ngo tool airflow-go-pack --goos linux --goarch amd64 ./example/bundle -- -trimpath # cross-compile; flags after -- pass to `go build`\ngo tool airflow-go-pack --executable ./bin/sample-dag-bundle --source main.go --airflow-metadata <airflow-metadata.yaml> # pack an existing binary\ngo tool airflow-go-pack inspect ./bin/sample-dag-bundle # inspect a packed bundle\n```\n\nThe packer builds the binary, execs it with `--airflow-metadata` to capture the manifest from `RegisterDags`, then appends source + manifest + a 64-byte trailer. The result is one runnable file.\n\n- **Build for the worker's OS/arch.** The bundle is a native executable and is not portable; cross-compile with `--goos`/`--goarch`. A mismatched binary fails on the worker with `exec format error`.\n- **Re-pack after any change to the binary.** Re-stripping, re-signing, or swapping in a debug build invalidates the trailer's `binary_sha256`, and the bundle is then rejected.\n\n---\n\n## Wire up the coordinator\n\nPython's `ExecutableCoordinator` scans `executables_root`, matches the incoming `dag_id` against each bundle's embedded manifest, verifies its integrity hash, then forks the bundle. No Go process runs on the host.\n\n1. Place the packed executable under a scanned directory:\n\n ```bash\n cp ./bundle /opt/airflow/executable-bundles/ # identified by the AFBNDL01 trailer, not by filename\n ```\n\n2. Register `ExecutableCoordinator` and route the queue to it (see **configuring-airflow-language-sdks**):\n\n ```ini\n [sdk]\n coordinators = {\"go\": {\"classpath\": \"airflow.sdk.coordinators.executable.ExecutableCoordinator\", \"kwargs\": {\"executables_root\": [\"/opt/airflow/executable-bundles\"]}}}\n queue_to_coordinator = {\"golang\": \"go\"}\n ```\n\n3. Deploy the matching Python stub DAG; its `queue=` must equal the `queue_to_coordinator` key (`golang` here), and its `dag_id`/`task_id`s must match what the bundle registered.\n\n---\n\n## Deployment paths\n\nThe SDK runs on any Airflow with the Task SDK; Astronomer tooling is not required.\n\n### Docker / Kubernetes\n\nCross-compile the bundle for the image's platform and bake it in. No Go runtime or worker process is needed in the image; the Python task runner forks the bundle.\n\n```dockerfile\nFROM apache/airflow:3.3.0 # the language SDKs target Airflow 3.3+\nCOPY ./executable-bundles/ /opt/airflow/executable-bundles/\n# set AIRFLOW__SDK__COORDINATORS and AIRFLOW__SDK__QUEUE_TO_COORDINATOR as env vars\n```\n\nOn the Helm chart, bake the bundle into a custom image as above or mount it via a shared volume, and set the `[sdk]` config through environment variables on the worker/scheduler. See **deploying-airflow** for the broader Docker Compose and Helm workflow.\n\n> The `apache/airflow:3.3.0` tag above is illustrative: the language SDKs need Airflow 3.3 or newer. Pin whatever current 3.x you actually run rather than copying this tag from memory; read the base image's current tags or docs.\n\n### Astro (one option, not required)\n\n1. Build/pack the bundle, then stage it in the project: `mkdir -p include/executable-bundles && cp ../go-bundle/<packed-bundle> include/executable-bundles/`.\n2. In the project `Dockerfile`, copy the bundle to the coordinator's directory: `COPY include/executable-bundles/ /opt/airflow/executable-bundles/`.\n3. Put the coordinator config in the project `.env` (loaded automatically): the `AIRFLOW__SDK__*` JSON values (see **configuring-airflow-language-sdks**).\n4. `astro dev start` (or `astro dev restart` after changes); deploy with `astro deploy`.\n\n> Don't pin Astro Runtime / Airflow versions from memory; read the generated `Dockerfile` or current docs. While the Go SDK is in preview, a beta/dev image may be required.\n\n---\n\n## Versioning and preview installs\n\n`go-sdk/` is a single Go module, so its release tag takes the monorepo subdir form, `go-sdk/vX.Y.Z` (do not create per-`cmd` tags). Your bundle module depends on `github.com/apache/airflow/go-sdk`; pinning that version also pins `airflow-go-pack`, which is a package in the same module referenced through the `tool` directive. Pin against the release tag:\n\n```bash\ngo get github.com/apache/airflow/go-sdk@v1.0.0\n```\n\nTo build against an unreleased commit or branch (for example, to try a fix ahead of the next tag), depend on it directly and Go fabricates a pseudo-version:\n\n```bash\ngo get github.com/apache/airflow/go-sdk@<commit-or-branch>\n```\n\n---\n\n## Deploy checklist\n\n- Bundle built **and packed** (`go tool airflow-go-pack`); registered `dag_id`/`task_id` match the Python stubs.\n- Built for the worker's OS/arch (e.g. `--goos linux --goarch amd64`).\n- Packed AFBNDL01 bundle placed under a directory in `executables_root`.\n- `ExecutableCoordinator` + `queue_to_coordinator` configured (**configuring-airflow-language-sdks**).\n- Python stub DAG deployed, its `queue=` routed to the Go coordinator.\n- Re-packed after any rebuild/strip/sign (preserves `binary_sha256`).\n\n---\n\n## Related Skills\n\n- **authoring-go-sdk-tasks**: Write the Go task code and the matching Python stubs.\n- **configuring-airflow-language-sdks**: Register `ExecutableCoordinator` and route the queue.\n- **deploying-airflow**: General Airflow deployment (Astro, Docker Compose, Kubernetes).\n- **setting-up-astro-project**: Initialize and configure an Astro project.\n"
}SHA-256: 3c44b532807f1cfe10aa9f15177ae2eefdd0aeb97765877c05efbc7a9f8dd949