deploying-go-sdk-bundles
Skill459 starsChanged 36 days agoApache-2.0View on GitHub
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.
- Reads credentials
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- astro-airflow-mcp/AGENTS.mdAGENTS.md
- airflow-hitlSkill
- airflow-pluginsSkill
- airflowSkill
- airflow-state-storeSkill
- analyzing-dataSkill
- annotating-task-lineageSkill
- authoring-dagsSkill
- authoring-go-sdk-tasksSkill
- authoring-java-sdk-tasksSkill
- authoring-language-sdk-tasksSkill
- blueprintSkill
- checking-freshnessSkill
- configuring-airflow-language-sdksSkill
- cosmos-dbt-coreSkill
- cosmos-dbt-fusionSkill
- creating-openlineage-extractorsSkill
- dag-factorySkill
- debugging-dagsSkill
- delegating-to-ottoSkill
- deploying-airflowSkill
- deploying-java-sdk-bundlesSkill
- managing-astro-deploymentsSkill
- managing-astro-local-envSkill
- migrating-airflow-2-to-3Skill
- migrating-ai-sdk-to-common-aiSkill
- migrating-dagster-to-airflowSkill
- profiling-tablesSkill
- setting-up-astro-projectSkill
- testing-dagsSkill
- tracing-downstream-lineageSkill
- tracing-upstream-lineageSkill
- troubleshooting-astro-deploymentsSkill
- warehouse-initSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Place the packed executable under a scanned directory:
- Very specific: line 78
Put the coordinator config in the project .env (loaded automatically): the AIRFLOW__SDK__* JSON values (see …
- Distinctive: line 114
authoring-go-sdk-tasks: Write the Go task code and the matching Python stubs.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deploying Go SDK Bundles
A 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.
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+).
Order of operations: write the tasks (authoring-go-sdk-tasks) -> build and pack the bundle (this skill) -> place it under
executables_rootand configure the coordinator -> deploy the matching Python stub DAG.
Build and pack the bundle
The 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):
go tool airflow-go-pack ./example/bundle # build + pack in one step
go tool airflow-go-pack --goos linux --goarch amd64 ./example/bundle -- -trimpath # cross-compile; flags after -- pass to `go build`
go tool airflow-go-pack --executable ./bin/sample-dag-bundle --source main.go --airflow-metadata <airflow-metadata.yaml> # pack an existing binary
go tool airflow-go-pack inspect ./bin/sample-dag-bundle # inspect a packed bundleThe 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.
- 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 withexec format error. - 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.
Wire up the coordinator
Python'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.
Place the packed executable under a scanned directory:
cp ./bundle /opt/airflow/executable-bundles/ # identified by the AFBNDL01 trailer, not by filenameRegister
ExecutableCoordinatorand route the queue to it (see configuring-airflow-language-sdks):[sdk] coordinators = {"go": {"classpath": "airflow.sdk.coordinators.executable.ExecutableCoordinator", "kwargs": {"executables_root": ["/opt/airflow/executable-bundles"]}}} queue_to_coordinator = {"golang": "go"}- Deploy the matching Python stub DAG; its
queue=must equal thequeue_to_coordinatorkey (golanghere), and itsdag_id/task_ids must match what the bundle registered.
Deployment paths
The SDK runs on any Airflow with the Task SDK; Astronomer tooling is not required.
Docker / Kubernetes
Cross-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.
FROM apache/airflow:3.3.0 # the language SDKs target Airflow 3.3+
COPY ./executable-bundles/ /opt/airflow/executable-bundles/
# set AIRFLOW__SDK__COORDINATORS and AIRFLOW__SDK__QUEUE_TO_COORDINATOR as env varsOn 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.
The
apache/airflow:3.3.0tag 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.
Astro (one option, not required)
- Build/pack the bundle, then stage it in the project:
mkdir -p include/executable-bundles && cp ../go-bundle/<packed-bundle> include/executable-bundles/. - In the project
Dockerfile, copy the bundle to the coordinator's directory:COPY include/executable-bundles/ /opt/airflow/executable-bundles/. - Put the coordinator config in the project
.env(loaded automatically): theAIRFLOW__SDK__*JSON values (see configuring-airflow-language-sdks). astro dev start(orastro dev restartafter changes); deploy withastro deploy.
Don't pin Astro Runtime / Airflow versions from memory; read the generated
Dockerfileor current docs. While the Go SDK is in preview, a beta/dev image may be required.
Versioning and preview installs
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:
go get github.com/apache/airflow/go-sdk@v1.0.0To 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:
go get github.com/apache/airflow/go-sdk@<commit-or-branch>Deploy checklist
- Bundle built and packed (
go tool airflow-go-pack); registereddag_id/task_idmatch the Python stubs. - Built for the worker's OS/arch (e.g.
--goos linux --goarch amd64). - Packed AFBNDL01 bundle placed under a directory in
executables_root. ExecutableCoordinator+queue_to_coordinatorconfigured (configuring-airflow-language-sdks).- Python stub DAG deployed, its
queue=routed to the Go coordinator. - Re-packed after any rebuild/strip/sign (preserves
binary_sha256).
Related Skills
- authoring-go-sdk-tasks: Write the Go task code and the matching Python stubs.
- configuring-airflow-language-sdks: Register
ExecutableCoordinatorand route the queue. - deploying-airflow: General Airflow deployment (Astro, Docker Compose, Kubernetes).
- setting-up-astro-project: Initialize and configure an Astro project.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

