configuring-airflow-language-sdks

Configures Airflow to run language SDK tasks (Go and future native SDKs) — register a coordinator, map a queue to it, ensure the runtime/artifact on workers,…

npx skills add https://github.com/astronomer/agents --skill configuring-airflow-language-sdks

Configuring Airflow for Language SDKs

To run language SDK tasks, Airflow needs to know two things: which coordinator launches the native subprocess, and which queue routes to that coordinator. The mechanism is identical across every language SDK — only each coordinator's classpath and kwargs differ. This skill documents the shared wiring once, then the per-coordinator options. It is platform-neutral: the same settings apply on open-source Airflow and on managed platforms like Astro.

Experimental. The language SDKs are in preview; configuration keys may change.

For the task code, see authoring-language-sdk-tasks (and the per-language authoring skill, e.g. authoring-go-sdk-tasks). For building and shipping the artifact, see the per-language deploy skill (e.g. deploying-go-sdk-bundles).


Prerequisites on the worker

  • The runtime or artifact the SDK needs must be present on the worker nodes, because the coordinator spawns a native subprocess per task instance. The exact requirement is per-SDK — see Per-coordinator options (the Go SDK needs no language runtime: the bundle is a self-contained native executable, but it must be built for the worker's OS/arch).
  • The compiled/native artifact(s) must be reachable on the worker. See the per-language deploy skill.
  • The coordinators ship with the Airflow Task SDK (apache-airflow-task-sdk, installed with Airflow). No extra Python package is required.

The two settings

Both live in the [sdk] configuration section and apply to every language SDK:

  1. coordinators — a JSON object mapping a coordinator name you choose to its implementation (classpath) and constructor kwargs.
  2. queue_to_coordinator — a JSON object mapping a task queue to a coordinator name.

A task whose stub sets queue="..." is handed to the named coordinator, which launches the native subprocess. The coordinator name is arbitrary — it just has to be the same string in both settings. The queue name must match the queue= set on the Python @task.stub.

Option A: airflow.cfg

[sdk]
coordinators = {
  "go": {
    "classpath": "airflow.sdk.coordinators.executable.ExecutableCoordinator",
    "kwargs": {"executables_root": ["/opt/airflow/executable-bundles"]}
  }
}
queue_to_coordinator = {"golang": "go"}

Option B: environment variables

Each value must be valid one-line JSON. This form is convenient for containers, .env files, Docker Compose, and Helm.

export AIRFLOW__SDK__COORDINATORS='{"go": {"classpath": "airflow.sdk.coordinators.executable.ExecutableCoordinator", "kwargs": {"executables_root": ["/opt/airflow/executable-bundles"]}}}'
export AIRFLOW__SDK__QUEUE_TO_COORDINATOR='{"golang": "go"}'

You can register multiple coordinators at once (e.g. one per language) and map different queues to each.


Per-coordinator options

The classpath and kwargs are specific to each coordinator. Add a subsection here as new language SDKs land.

ExecutableCoordinator (Go and other self-contained-executable SDKs)

  • classpath: airflow.sdk.coordinators.executable.ExecutableCoordinator
  • Worker runtime: none beyond the bundle itself. The bundle is a self-contained native executable (AFBNDL01), so it needs no language runtime, but it must be built for the worker's OS/arch (a mismatch fails with exec format error).
ParameterDefaultDescription
executables_root(required)One or more directories scanned recursively for executable bundles (AFBNDL01-trailered native binaries). Accepts a string or a list of strings/paths. Bundles are identified by the trailer magic, not by filename. The coordinator matches an incoming dag_id against each bundle's embedded manifest and verifies its integrity hash before launching.
task_startup_timeout10.0Seconds to wait for the subprocess to connect after launch. Increase it if bundle startup is slow (constrained hardware, first cold start).

(Future coordinators — for other languages — will list their own classpath, runtime, and kwargs here.)


Verifying the configuration

  1. Confirm the artifact is usable where workers run (for the Go SDK: the packed bundle exists and matches the worker's OS/arch) via astro dev bash or docker compose exec ....
  2. Confirm the artifact directory referenced in kwargs (e.g. executables_root) actually contains your artifact on the worker filesystem.
  3. Trigger the DAG and open the native task's logs — you should see the subprocess start and your task output.

Troubleshooting

SymptomLikely cause / fix
Task fails immediately mentioning coordinator or queuecoordinators / queue_to_coordinator not valid one-line JSON, or the queue name doesn't match the stub's queue=. Fix the JSON and restart.
"No artifact found" / "no DAGs" / "no bundle contains dag_id"The artifact-directory kwarg points at the wrong place, the artifact isn't there yet, or its dag_id doesn't match the stub. Confirm the path and the IDs.
Go bundle is skipped silentlyNot a valid AFBNDL01 bundle, or its integrity hash failed (re-pack after any strip/sign/rebuild).
exec format error on the Go bundleBuilt for a different OS/arch than the worker. Cross-compile with --goos/--goarch (see deploying-go-sdk-bundles).
DAG run hangs at the native taskRaise task_startup_timeout (e.g. 30.0); first-run subprocess startup can be slow.

Related Skills

  • authoring-language-sdk-tasks: The shared Python-stub pattern and conceptual model.
  • authoring-go-sdk-tasks: Go task code and matching Python stubs.
  • deploying-go-sdk-bundles: Build/pack the Go bundle and place it where the coordinator scans.
  • deploying-airflow: General deployment of Airflow on Astro, Docker Compose, or Kubernetes.

More skills from astronomer

airflow-adapter
astronomer
Airflow adapter pattern for v2/v3 API compatibility. Use when working with adapters, version detection, or adding new API methods that need to work across…
official
aip-user-stories
astronomer
Generate verified recipe playbooks from AIPs with PR implementations (post mode), or speculative user stories from AIPs without implementations (pre mode). Use…
official
airflow-java-sdk
astronomer
Guide for contributing to the Airflow Java SDK (AIP-108). Use this skill whenever a contributor is working in the `java-sdk/` directory or on the Java…
official
airflow-new-sdk
astronomer
Guide for implementing a brand-new language SDK for Airflow (AIP-108). Use this skill when a contributor wants to add support for a new programming language —…
official
airflow-translations
astronomer
Add or update translations for the Apache Airflow UI. Guides through setting up locales, scaffolding translation files, translating with locale-specific…
official
magpie-setup
astronomer
Adopt and maintain the apache-magpie framework in a project repo via the snapshot-based adoption mechanism. The only framework skill committed in an adopter's…
official
prepare-providers-documentation
astronomer
Replace the manual commit-by-commit classification step in `breeze release-management prepare-provider-documentation` with AI-driven classification. For each…
official
chart-tests
astronomer
Use when writing, editing, reviewing, or running Helm chart tests for the Astronomer APC repository. Covers pytest patterns, render_chart() usage, sub-chart…
official