jscheffl commented on code in PR #51738:
URL: https://github.com/apache/airflow/pull/51738#discussion_r2175959884


##########
airflow-core/src/airflow/cli/commands/dag_command.py:
##########
@@ -66,12 +67,18 @@
 def dag_trigger(args) -> None:
     """Create a dag run for the specified dag."""
     api_client = get_current_api_client()
+    try:
+        user = getuser()
+    except AirflowConfigException as e:
+        log.warning("Failed to get user name from os: %s, not setting the 
triggering user", e)
+        user = None
     try:
         message = api_client.trigger_dag(
             dag_id=args.dag_id,
             run_id=args.run_id,
             conf=args.conf,
             logical_date=args.logical_date,
+            triggering_user=user,

Review Comment:
   Same response like 
https://github.com/apache/airflow/pull/51738#discussion_r2175886856



-- 
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]

Reply via email to