Repository navigation
Description
Under which category would you file this issue?
Task SDK
Apache Airflow version
3.4.0b2 with apache-airflow-task-sdk 1.4.0b2 and apache-airflow-ts-sdk 1.0.0-beta1; the serializer code is the same on main as of October 30, 2026.
What happened and how to reproduce it?
The TypeScript guide says a task inherits the Dag's queue when it sets none. That holds when the task passes no queue option, but not when it passes queue: undefined, which is what optional configuration produces and which compiles under --strict. The serialized task then has no queue, so the task instance gets the default queue, the worker routes it to the Python coordinator, and it fails on its first try with no retry.
Three Dags in one bundle show it:
import { Bundle, Dag } from "apache-airflow-ts-sdk";
const optionalQueue: string | undefined = undefined;
const omitted = new Dag("queue_omitted", { queue: "typescript" });
omitted.task("work", async () => 42, {})();
const undefinedQueue = new Dag("queue_undefined", { queue: "typescript" });
undefinedQueue.task("work", async () => 42, { queue: optionalQueue })();
const explicit = new Dag("queue_explicit", { queue: "typescript" });
explicit.task("work", async () => 42, { queue: "typescript" })();
await new Bundle(omitted, undefinedQueue, explicit).serve();Pack it with npx airflow-ts-pack src/main.ts --outdir dist, put dist/bundle.min.mjs in the dags folder, run airflow standalone (LocalExecutor, SQLite) with
[sdk]
coordinators = {"ts": {"classpath": "airflow.sdk.coordinators.node.NodeCoordinator"}}
queue_to_coordinator = {"typescript": "ts"}and trigger the three Dags once each.
| Dag | Task options | Task instance queue | State |
|---|---|---|---|
queue_omitted |
{} |
typescript |
success |
queue_undefined |
{ queue: undefined } |
default |
failed |
queue_explicit |
{ queue: "typescript" } |
typescript |
success |
The failed task's log: This task belongs to a native Lang-SDK Dag and cannot run in Python. Give the Dag's tasks their own queue and route it to a NodeCoordinator in [sdk] queue_to_coordinator.
The cause is in ts-sdk/src/coordinator/serde.ts: withDagQueue leaves the spec alone when the queue key is present, even with an undefined value, and the field writer then skips the undefined value, so nothing writes a queue. Elsewhere the SDK treats an undefined option as unset.
What you think should happen instead?
A task whose queue option is undefined should inherit the Dag's queue, the same as a task that leaves the option out, so all three Dags above run on the Node coordinator.
Operating System
macOS 26.2
Deployment
Virtualenv installation
Versions of Apache Airflow Providers
None involved.
Anything else?
Node.js 26.12.1, TypeScript 6.0.3. The same serialized output appears with the SDK alone (serializeDag on the three Dags), on 1.0.0-beta1 and on main, so it is not a regression from the recent blank-queue validation (#75573). No duplicate found in open and closed issue and PR searches for queue undefined, withDagQueue and queue inherit in the TypeScript SDK; #74094 and #75267 are about config-backed defaults and leave this condition unchanged.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Activity