jason810496 opened a new issue, #71062: URL: https://github.com/apache/airflow/issues/71062
### Background https://github.com/apache/airflow/pull/70570 makes the execution API derive a **per-map-index** arg-binding spec for a dynamically mapped `@task.stub`. https://github.com/apache/airflow/pull/70571 implements the Go-SDK consumer; the TypeScript SDK has neither the mapped consumer nor the unmapped one yet, so this work assumes the TypeScript arg-binding consumer for unmapped stub calls lands first. `XComArgBinding` carries two selectors the unmapped path never sets: - `map_index` — pull the upstream XCom row at that index (expand over a *mapped* upstream). - `element_index` — pull the unmapped upstream row, then take element N of the resulting sequence (expand over an *unmapped* upstream's list output). Literal expands are resolved to their element server-side and arrive as plain literals, so the binding surface itself is unchanged from the unmapped case. Note that the generated `ts-sdk/src/generated/supervisor.ts` models are regenerated as part of the upstream schema bump, so the types should already be present; only the runtime resolution is missing. ### What needs to happen 1. Extend the TypeScript runtime's arg-binding resolution to honour `map_index` and `element_index`, with typed and out-of-range errors that fail the task before the handler runs. 2. Keep the unmapped path unchanged: a binding with neither selector takes the whole value. 3. Add a mapped example to the TypeScript example bundle and cover it with an Airflow-level integration test, alongside the existing coordinator-mode tests. ### Acceptance criteria - A `@task.stub` expanded with `.expand()` delivers the correct per-index element to the TypeScript handler for all three expand forms (literal collection, unmapped upstream's list output, mapped upstream). - Multiple expanded kwargs (the cross product) bind correctly, including mixed expand sources in one call. - `.partial()` literals and unmapped-upstream XComs bind identically on every index. - Out-of-range or type-mismatched selectors reject loudly instead of silently passing `undefined`. ### Context - Depends on https://github.com/apache/airflow/pull/69757 and https://github.com/apache/airflow/pull/70570, plus the TypeScript arg-binding consumer for unmapped stub calls - Go parallel: https://github.com/apache/airflow/pull/70571 -- 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]
