jason810496 commented on code in PR #73122:
URL: https://github.com/apache/airflow/pull/73122#discussion_r4026249349
##########
ts-sdk/src/sdk/dag.ts:
##########
@@ -89,23 +89,23 @@ export interface TaskOptions {
/**
* References to the upstream tasks this task consumes.
*
- * Not used yet: a handler receives `{ctx, client}` only, and the Python stub
- * Dag defines task order. Read an upstream return value explicitly instead —
- * `client.getXCom({ key: "return_value", taskId: "extract" })`, where
+ * Not used yet: a handler takes no arguments, and the Python stub Dag
+ * defines task order. Read an upstream return value explicitly instead, with
+ * `getClient().getXCom({ key: "return_value", taskId: "extract" })`, where
* omitting `taskId` reads the *running* task's own XCom, not the upstream.
*
* In the future these will declare dependencies in native TypeScript Dags.
*/
readonly inputs?: TaskInputs;
- /** Task-level options. Stored, but not used yet — see {@link TaskSpec}. */
+ /** Task-level options. Stored, but not used yet (see {@link TaskSpec}). */
readonly spec?: TaskSpec;
}
/** Per-task record a Dag retains: the handle, the handler, its spec, and the
* upstream handles feeding it. */
export interface TaskRecord {
readonly task: TaskRef;
- readonly handler: TaskHandler;
+ readonly handler: TaskFunction;
Review Comment:
The `TaskFunction` type will be reused for the `dag.task(fn...)` native Dag
feature as well, but I can also keep it as-is `TaskHandler` for now. Both work
with me.
--
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]