TS SDK: replace registerTask with Dag and registerDags - #71144
Open
jason810496 wants to merge 1 commit into
Open
TS SDK: replace registerTask with Dag and registerDags#71144jason810496 wants to merge 1 commit into
jason810496 wants to merge 1 commit into
Conversation
jason810496
force-pushed
the
refactor/ts-sdk/dag-authoring-api
branch
3 times, most recently
from
August 6, 2026 04:33
ab7eba5 to
dab6b7b
Compare
registerTask bound one handler at a time to a Dag/task pair declared in a Python stub file, and left no object that could later carry a natively declared TypeScript Dag. Reworking only the authoring interface now means native Dag support and TaskFlow-style data passing can arrive without a second breaking change for users: a Dag instance keeps its spec and every task's handler, spec and declared inputs, which is what a future serialize() needs to emit the serialized Dag JSON. Producing that JSON stays out of scope, so Dag parsing still answers with no serialized Dags. The coordinator wire protocol and the bundle manifest shape are unchanged.
jason810496
force-pushed
the
refactor/ts-sdk/dag-authoring-api
branch
from
August 6, 2026 04:58
dab6b7b to
1676164
Compare
jason810496
marked this pull request as ready for review
August 6, 2026 05:02
Member
|
What’s the plan to do the external vs pure TS dags after this? |
Member
Author
Along with #71213, the user should set the Additionally, we can introduce a |
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.
Why
registerTask({ dagId, taskId }, handler)binds one handler to a Python stub Dag/task pair at a time and leaves no object that can carry native TypeScript Dag declaration later (#69288). This PR changes only the user-facing authoring interface so it can grow into TaskFlow and native Dag support without another breaking change.How
Please noted that the spec at both Dag and Task level arguments (
DagSpec,TaskSpec) are no-op, I intentionally placeholder them in this PR to prevent further breaking change.new Dag(dagId, spec?)takes a positional id plus an optional trailing spec object.dag.task(taskId, handler, options?)returns aTaskhandle, withinputsandspecas named options ({ inputs: { extracted }, spec: { retries: 2 } }) so either can be given alone and future options need no new parameter.Daginstance retains its spec and each task's(taskId, handler, spec, inputs), so a futureserialize()can produce the serialized Dag JSON forDagFileParsingResult.serialized_dags.registerTask,listRegisteredTasks, andTaskRegistrationare replaced withregisterDags(...dags)as entrypoint.Was generative AI tooling used to co-author this PR?