Repository navigation
TS SDK: answer TaskHandlerParseRequest from bundle.serve - #73976
Draft
jason810496 wants to merge 3 commits into
Conversation
jason810496
added this pull request to stack #73978
September 30, 2026 17:59
This was referenced Sep 30, 2026
1 task done
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
from
October 1, 2026 06:26
892f414 to
e48a8b6
Compare
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
from
October 1, 2026 06:30
e48a8b6 to
5b770b6
Compare
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
from
October 1, 2026 10:55
5b770b6 to
3d1332e
Compare
This was referenced Oct 1, 2026
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
from
October 1, 2026 14:44
3d1332e to
dc5a082
Compare
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
2 times, most recently
from
October 2, 2026 05:48
23843ba to
0f344dc
Compare
1 task done
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
from
October 2, 2026 11:36
0f344dc to
6c3e3e3
Compare
This was referenced Oct 3, 2026
The Dag processor asks the runtime a stub task would run which task handlers it registers, and a TypeScript bundle fails on that first frame as an unsupported message. bundle.serve() now replies with one TaskHandlerParsingResult listing every TaskHandler, keyed by Dag id with each Dag's handlers in registration order, so the answer depends only on the bundle. Types are erased, so each handler declares named with null params, and the Dag processor checks only that it exists. The tasks of a Dag declared in TypeScript are never task handlers and are left out. The result goes out as a request, and the runtime waits for the parent's acknowledgement before it exits, as the Go and Java runtimes do.
The probe from #73974 needs each coordinator to find the artifact a stub task runs and to start its runtime. NodeCoordinator finds the bundle with the scan that execute_task uses and returns its path with symlinks resolved, as the Go and Java coordinators do, since the scan returns the path it walked, which can pass through symlinks. The probe verifies the bundle again and runs it with node, as a task does.
The coordinator and SDK tests each fake one side, so nothing showed that a bundle packed with airflow-ts-pack answers the way the Dag processor parses it. The test packs ts-sdk/example from a copy of the SDK sources, finds it as a stub task of typescript_example would, and probes it. It needs Node.js 22 and pnpm, so it runs only with AIRFLOW_LANG_SDK_REAL_PROBE_TESTS=1, and it skips with the reason when node is missing, too old, or cannot report its version.
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
from
October 5, 2026 18:12
6c3e3e3 to
b52f31f
Compare
jason810496
removed this pull request from stack #73978
October 6, 2026 02:27
jason810496
changed the base branch from
jason/core-taskhandler-refactor/06-go-sdk-task-handler-parse
to
jason/core-taskhandler-refactor/08-java-sdk-task-handler-parse
October 6, 2026 02:34
jason810496
added this pull request to stack #74318
October 6, 2026 02:35
1 task done
jason810496
force-pushed
the
jason/core-taskhandler-refactor/07-ts-sdk-task-handler-parse
branch
from
October 6, 2026 02:44
b52f31f to
9c284fc
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack (bottom to top), on native #74037 (stack #74170): #73973, #73974, #73975, #74317, #73976, #74067, #74135, #74140, #74141, #73971, #74030, #74031, #74032, #74136, #74137, #74138, #74139
bundle.serve()now answers #73974's probe with everyTaskHandlerthe bundle registers, andNodeCoordinatorcan find and start the bundle a stub task would run. Until now a TypeScript bundle failed on aTaskHandlerParseRequestas an unsupported first frame. Nothing calls the probe yet: #74135 does.answers:
TaskHandlers are declared, keyed by Dag id in registration order. Tasks of a Dag declared in TypeScript are left out.withArgNames. Each handler isnamedwithparams=None, and the Dag processor checks only that it exists.bundle.serve()waits up to 30 s for the parent to acknowledge the answer. An error, a closed socket or a timeout fails the process._find_task_handler_artifactis the worker's own scan, and_build_parse_task_handler_commandis native Parse native TypeScript Dags with the Node coordinator #74037's_build_bundle_command, which verifies the bundle and runs it withnodeas a task does.Compatibility: a bundle packed from main before this change reports
2026-10-30but cannot answer, so its probe fails and #74135 logs a warning. Packing it again fixes it. A bundle packed with the published0.1.0-beta1is abundle.mjs, which the scan does not find, so it is not probed (a worker cannot run it either).Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines