sreecharan-desu commented on issue #76370:
URL: https://github.com/apache/airflow/issues/76370#issuecomment-6767294584

   tried @apache-airflow/[email protected] on node 24.22.1 (typescript 7.0.2, 
esbuild 0.28.2). the docs quick start typechecks, and `airflow-ts-pack 
src/main.ts --outdir dist` wrote dist/bundle.min.mjs. i also packed a small dag 
with a task group, dag.if, and `{ retries: 2, retryDelay: 30 }`.
   
   1. wiring: the factory-then-call style works. writing
   
   ```ts
   const summarize = dag.task("summarize", async ({ eu, us }: { eu: Orders; us: 
Orders }) => ({ total: eu.count + us.count }));
   const summary = summarize({ eu: euRef, us: usRef });
   ```
   
   felt a bit repetitive, but the types and the edges were clear once i did it.
   
   2. options: camelCase is fine. a typo like `{ retryyDelay: 10 }` did not get 
a useful compile error. tsc said `Argument of type '() => Promise<void>' is not 
assignable to parameter of type 'Operator<void, unknown>'` and never mentioned 
retryyDelay. packing that file then failed at runtime with `Error: Unknown 
option "retryyDelay" in the spec for Dag "ts_typo" task "load"`, which is the 
message i wanted from tsc.
   
   3. type safety: misspelled task inputs are great. `report({ rowss: extract() 
})` failed with TS2561 `Did you mean to write 'rows'?`. option typos should get 
that same treatment. also confirmed pack does not typecheck: the same `rowss` 
typo packed cleanly when i skipped tsc.
   
   4. build: pack is straightforward. running the bundle without airflow exits 
1 with `Error: Missing --comm=host:port`, which is expected. i didn't stand up 
a full airflow + NodeCoordinator. a `npm create` template would have saved the 
ESM / tsconfig setup. small docs nit: the package README says `npm install 
@apache-airflow/[email protected]` and "Status: 1.0.0", but npm only has 0.3.5, 
1.0.0-beta2, and 1.0.0-rc1.
   
   5. missing: for actually running dags, `airflow dags test` on a typescript 
dag and a project template would help first. i didn't get far enough to miss 
dynamic mapping.
   


-- 
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]

Reply via email to