Skip to content

[v3-2-test] Propagate triggering user to child DAG runs via TriggerDagRunOperator (#65747)#66378

Open
github-actions[bot] wants to merge 3 commits into
v3-2-testfrom
backport-f06df11-v3-2-test
Open

[v3-2-test] Propagate triggering user to child DAG runs via TriggerDagRunOperator (#65747)#66378
github-actions[bot] wants to merge 3 commits into
v3-2-testfrom
backport-f06df11-v3-2-test

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 4, 2026

Previously, when a task used TriggerDagRunOperator to trigger a child DAG,
the child run's triggering_user_name was left unset and the UI displayed
it as anonymous. The information was already captured on the parent
DagRun but never forwarded through the Execution API.

The POST /execution/dag-runs/{dag_id}/{run_id} endpoint now looks up the
calling task instance's parent DagRun and forwards its triggering_user_name
to the new child run. Chains of TriggerDagRunOperator runs now show the
original human user end-to-end
(cherry picked from commit f06df11)

Co-authored-by: Dheeraj Turaga dheerajturaga@gmail.com

@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:task-sdk labels May 4, 2026
@dheerajturaga dheerajturaga marked this pull request as ready for review May 4, 2026 21:59
@eladkal
Copy link
Copy Markdown
Contributor

eladkal commented May 5, 2026

@dheerajturaga tests are failing

@potiuk potiuk force-pushed the backport-f06df11-v3-2-test branch from 76090fc to c677a99 Compare May 10, 2026 00:25
…gRunOperator (#65747)

Previously, when a task used TriggerDagRunOperator to trigger a child DAG,
  the child run's triggering_user_name was left unset and the UI displayed
  it as anonymous. The information was already captured on the parent
  DagRun but never forwarded through the Execution API.

  The POST /execution/dag-runs/{dag_id}/{run_id} endpoint now looks up the
  calling task instance's parent DagRun and forwards its triggering_user_name
  to the new child run. Chains of TriggerDagRunOperator runs now show the
  original human user end-to-end
(cherry picked from commit f06df11)

Co-authored-by: Dheeraj Turaga <dheerajturaga@gmail.com>
@potiuk potiuk force-pushed the backport-f06df11-v3-2-test branch from c677a99 to 3a99df8 Compare May 10, 2026 01:40
potiuk added 2 commits May 12, 2026 03:43
The backport's test imports TIClaims from
airflow.api_fastapi.execution_api.datamodels.token, but TIClaims
was added on main by #63604 ("Validate task identity token claims
with a typed schema") which was not backported to v3-2-test.

On v3-2-test, TIToken.claims is still typed as `dict[str, Any]`
(loose dict), so the test can construct it with a plain dict
instead of the TIClaims model. Drops the TIClaims import and
replaces TIClaims(scope="execution") with {"scope": "execution"}.

This is the same shape of fix as #66743 — backport's test
references a symbol that exists only on main. Inlining the
adapted construction avoids a feature backport (#63604) just to
satisfy a test fixture's typed argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants