shivaam opened a new pull request, #68548:
URL: https://github.com/apache/airflow/pull/68548
This adds the Python-side coordinator needed to run TypeScript tasks through
Airflow coordinator mode.
It pairs with the public TypeScript Task SDK interface in #67908. A Python
Dag still defines the scheduling graph with stub tasks, while the task
implementation can live in a TypeScript bundle. At execution time, Airflow
routes the stub task to this coordinator, which starts the Node.js bundle
through the existing supervisor subprocess path.
The expected bundle layout is:
```text
/opt/airflow/ts-bundles/
bundle.mjs
airflow-metadata.yaml
```
`bundle.mjs` is the Node.js entrypoint for the TypeScript task runtime.
`airflow-metadata.yaml` describes the bundle and provides the supervisor schema
version the coordinator should use when talking to the runtime.
Example metadata:
```yaml
airflow_bundle_metadata_version: "1.0"
sdk:
language: typescript
version: "0.1.0-alpha.0"
supervisor_schema_version: "2026-06-16"
source: src/airflow.ts
dags:
sales_pipeline:
tasks:
- extract
- transform
```
For this first PR, the coordinator only needs
`sdk.supervisor_schema_version`, but the metadata file follows the same general
shape as Airflow executable bundle metadata so TypeScript bundle tooling can
grow into it later.
Example Airflow config:
```ini
[sdk]
coordinators = {
"ts": {
"classpath":
"airflow.sdk.coordinators.typescript.TypescriptCoordinator",
"kwargs": {"bundles_root": ["/opt/airflow/ts-bundles"]}
}
}
queue_to_coordinator = {"typescript": "ts"}
```
This first version keeps bundle selection deliberately simple.
`bundles_root` is an ordered fallback list of directories, and the first valid
`bundle.mjs` with valid metadata is used. Dag/task-aware selection across
multiple TypeScript bundles is left for follow-up work once the TypeScript
bundle tooling exists.
### Testing
I ran a full local daemon E2E with `api-server`, `dag-processor`, and
`scheduler`.
The E2E run verified successful TypeScript task execution for variable
access, XComs, connections, and SIGTERM cancellation handling.
### Follow-up work
- Add the TypeScript SDK runtime PR with `startCoordinator()`.
- Add an official TypeScript pack/build tool that generates `bundle.mjs` and
`airflow-metadata.yaml`.
- Add Dag/task-aware multi-bundle selection after bundle tooling exists.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes - OpenAI Codex
Generated-by: OpenAI Codex following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]