phanikumv commented on code in PR #74417:
URL: https://github.com/apache/airflow/pull/74417#discussion_r4218105133
##########
go-sdk/airflow/trigger_dag_run.go:
##########
@@ -36,21 +38,23 @@ import (
// leaves its parameter at the Python default. PokeInterval and Deferrable are
pointers so that a
// pointer to 0 or false can set that value instead of leaving the default.
//
-// DagID, RunID, LogicalDate and the values in Conf are templated. They can
hold Jinja such as
-// "{{ ds }}", which Airflow renders when the task runs.
+// The task does not render templates. DagID, RunID, Note and the values in
Conf are sent as they
+// are, so a string such as "{{ ds }}" reaches the new Dag run unchanged. The
task does not offer
+// openlineage_inject_parent_info, so it adds nothing to Conf.
type TriggerDagRunSpec struct {
// DagID is the dag_id of the Dag to trigger. It is required.
DagID string
- // RunID is the run_id of the new Dag run. When RunID is empty, Airflow
generates one.
+ // RunID is the run_id of the new Dag run. When RunID is empty, the
task names the run after
Review Comment:
**Replacement for L125–L127** (apply manually — lines not in the diff):
Optional: since nothing gets rendered, RunID: "triggered_{{ run_id }}" (an
easy habit to bring over from Python) only fails at runtime: the run_id regex
check returns a 400 on the first run, and a templated DagID gets a
404. {{ can never be valid in a dag_id, and the default
allowed_run_id_pattern rejects it in a run_id, so rejecting it here would
surface the mistake when the Dag is parsed. Note and Conf should stay
unguarded, since
{{ is legitimate there.
--
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]