Uh oh!
There was an error while loading. Please reload this page.
Add triggering_user_name to DagRunProtocol interface - #56193
Conversation
Enable tasks running in isolated environments to access the username that triggered a DAG run without requiring direct database access. Changes: - Add triggering_user_name field to DagRunProtocol interface - Update task-sdk DagRun data model to include triggering_user_name - Update execution API DagRun model to include triggering_user_name - Ensure field flows from database through API to task context This allows developers to identify DAG run triggers from within task code using the existing DagRunProtocol interface.
dheerajturaga
commented
Sep 29, 2025
cc: @jscheffl |
dheerajturaga
commented
Oct 9, 2025
Cc: @kaxil I would like this in 3.1.1 |
jscheffl
commented
Oct 9, 2025
Adding backport label but leave the decision to @kaxil if OK to backport as not a classic bug fix but a minor feature |
https://github.com/apache/airflow/blob/main/contributing-docs/19_execution_api_versioning.rst -- We would need to add a Cadwyn migration. Check examples in https://github.com/apache/airflow/tree/main/airflow-core/src/airflow/api_fastapi/execution_api/versions |
Add backward compatibility migration for the new triggering_user_name field added to the DagRun model in the Execution API. This ensures older API clients continue to work seamlessly with newer API servers.
dheerajturaga
commented
Oct 11, 2025
cc: @kaxil this looks good? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
) * Add triggering_user_name to DagRunProtocol interface Enable tasks running in isolated environments to access the username that triggered a DAG run without requiring direct database access. Changes: - Add triggering_user_name field to DagRunProtocol interface - Update task-sdk DagRun data model to include triggering_user_name - Update execution API DagRun model to include triggering_user_name - Ensure field flows from database through API to task context This allows developers to identify DAG run triggers from within task code using the existing DagRunProtocol interface. * Fix tests! * Add Cadwyn migration for triggering_user_name field in DagRunProtocol Add backward compatibility migration for the new triggering_user_name field added to the DagRun model in the Execution API. This ensures older API clients continue to work seamlessly with newer API servers. * Add tests for older versions where triggering user is missing * Remove triggering user from v2025-04-28 * Add a test with triggering_user_name set (cherry picked from commit 3120146) Co-authored-by: Dheeraj Turaga <dheerajturaga@gmail.com>
…che#56193) * Add triggering_user_name to DagRunProtocol interface Enable tasks running in isolated environments to access the username that triggered a DAG run without requiring direct database access. Changes: - Add triggering_user_name field to DagRunProtocol interface - Update task-sdk DagRun data model to include triggering_user_name - Update execution API DagRun model to include triggering_user_name - Ensure field flows from database through API to task context This allows developers to identify DAG run triggers from within task code using the existing DagRunProtocol interface. * Fix tests! * Add Cadwyn migration for triggering_user_name field in DagRunProtocol Add backward compatibility migration for the new triggering_user_name field added to the DagRun model in the Execution API. This ensures older API clients continue to work seamlessly with newer API servers. * Add tests for older versions where triggering user is missing * Remove triggering user from v2025-04-28 * Add a test with triggering_user_name set (cherry picked from commit 3120146) Co-authored-by: Dheeraj Turaga <dheerajturaga@gmail.com>
dheerajturaga
commented
Oct 22, 2025
@kaxil , the milestone needs to be 3.1.1? This seems to be missing from 3.1.1rc1 |
* Add triggering_user_name to DagRunProtocol interface Enable tasks running in isolated environments to access the username that triggered a DAG run without requiring direct database access. Changes: - Add triggering_user_name field to DagRunProtocol interface - Update task-sdk DagRun data model to include triggering_user_name - Update execution API DagRun model to include triggering_user_name - Ensure field flows from database through API to task context This allows developers to identify DAG run triggers from within task code using the existing DagRunProtocol interface. * Fix tests! * Add Cadwyn migration for triggering_user_name field in DagRunProtocol Add backward compatibility migration for the new triggering_user_name field added to the DagRun model in the Execution API. This ensures older API clients continue to work seamlessly with newer API servers. * Add tests for older versions where triggering user is missing * Remove triggering user from v2025-04-28 * Add a test with triggering_user_name set
kaxil
commented
Oct 22, 2025
Didn't include it in 3.1.1 since it isn't a bugfix |
Can we include it? I remember you mentioned it shouldn't be a problem. especially now since we have cadwyn migration added aswell. Its a significant item for our workflows given there's no way in airflow3 to identify dagrun owner in the task |
kaxil
commented
Oct 22, 2025
I did but unfortunately couldn't justify it as a bugfix when cherry-picking so had changed the milestone attached to it. I really do not want to risk 3.1.1 since there were a couple of high-priority bugfixes in it. |
kaxil
commented
Oct 22, 2025
Ok looking back and tracking it -- We will have it in 3.1.2 |
* Add triggering_user_name to DagRunProtocol interface Enable tasks running in isolated environments to access the username that triggered a DAG run without requiring direct database access. Changes: - Add triggering_user_name field to DagRunProtocol interface - Update task-sdk DagRun data model to include triggering_user_name - Update execution API DagRun model to include triggering_user_name - Ensure field flows from database through API to task context This allows developers to identify DAG run triggers from within task code using the existing DagRunProtocol interface. * Fix tests! * Add Cadwyn migration for triggering_user_name field in DagRunProtocol Add backward compatibility migration for the new triggering_user_name field added to the DagRun model in the Execution API. This ensures older API clients continue to work seamlessly with newer API servers. * Add tests for older versions where triggering user is missing * Remove triggering user from v2025-04-28 * Add a test with triggering_user_name set (cherry picked from commit 3120146)
kaxil
commented
Oct 31, 2025
Has been cherry-picked as faeb1bf |
Enable tasks running in isolated environments to access the username
that triggered a DAG run without requiring direct database access.
Changes:
This allows developers to identify DAG run triggers from within task
code using the existing DagRunProtocol interface.