jason810496 opened a new issue, #74414:
URL: https://github.com/apache/airflow/issues/74414
### Description
`triggerDagRun` in the TypeScript SDK always triggers the run with the
current time as its `logical_date`, and has no way to set `run_after`. Python's
`TriggerDagRunOperator` takes both:
- `logical_date`: the logical date of the triggered run, or no logical date
at all.
- `run_after`: when the triggered run may start.
Its generated `run_id` also depends on them: `manual__<isoformat(run_after
or logical_date)>`, plus a random 8-character suffix when the run has no
logical date.
The Go SDK runtime runner for `airflow.TriggerDagRun` keeps both options, as
`LogicalDate time.Time` (zero means now) and `RunAfter`, following Python. The
TypeScript SDK should offer the same, so a native Dag triggers runs the same
way in every Lang SDK:
```ts
dag.task(triggerDagRun({
dagId: "report",
logicalDate: new Date("2026-10-01T00:00:00Z"), // new
runAfter: new Date("2026-10-01T06:00:00Z"), // new
}), { taskId: "trigger_report" });
```
### Scope
- `TriggerDagRunSpec` gains `logicalDate?: Date | null` and `runAfter?:
Date`.
- `trigger-runner.ts` follows `TriggerDagRunOperator.execute` for both,
including the `run_id` rules and sending `run_after` only when it is set.
- Like the other options, the values are sent as written, with no Jinja
rendering (ADR-0008).
### Related
- `ts-sdk/src/sdk/trigger-dag-run.ts`,
`ts-sdk/src/coordinator/trigger-runner.ts`
- `airflow-core/adr/lang-sdk/0008-control-flow-constructs.md`
--
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]