Propagate triggering user to child DAG runs via TriggerDagRunOperator#65747
Conversation
|
CI needs fixing. |
|
What if there isn't a user? Would it make sense to fall back to the DAG ID (or something like that)? |
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
9e9114b to
8b717b1
Compare
if there isn't a user, it would default to None just like before. falling back to dagid for triggering user would be incorrect |
CI was broken on main, it just got fixed in #65748 |
shubhamraj-git
left a comment
There was a problem hiding this comment.
Thanks for the patch. Looks fine.
Tested locally, works as expected.
Backport successfully created: v3-2-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…gRunOperator (apache#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>
…gRunOperator (apache#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>
…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>
…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>
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
Was generative AI tooling used to co-author this PR?
ClaudeCode