[v3-2-test] Propagate triggering user to child DAG runs via TriggerDagRunOperator (#65747)#66378
Open
github-actions[bot] wants to merge 3 commits into
Open
[v3-2-test] Propagate triggering user to child DAG runs via TriggerDagRunOperator (#65747)#66378github-actions[bot] wants to merge 3 commits into
github-actions[bot] wants to merge 3 commits into
Conversation
1 task
dheerajturaga
approved these changes
May 4, 2026
Contributor
|
@dheerajturaga tests are failing |
76090fc to
c677a99
Compare
…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>
c677a99 to
3a99df8
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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