ephraimbuddy commented on code in PR #28998:
URL: https://github.com/apache/airflow/pull/28998#discussion_r1081247196


##########
airflow/api_connexion/endpoints/dag_run_endpoint.py:
##########
@@ -319,6 +330,19 @@ def post_dag_run(*, dag_id: str, session: Session = 
NEW_SESSION) -> APIResponse:
                 dag_hash=get_airflow_app().dag_bag.dags_hash.get(dag_id),
                 session=session,
             )
+            try:
+                to_log_data = {
+                    "event": "rest_dag_trigger",
+                    "owner": g.user.username,
+                    "extra": None,
+                    "task_id": None,
+                    "dag_id": f"{dag_run.dag_id}",

Review Comment:
   With the `action_logging`, do we still need this?



##########
airflow/api_connexion/endpoints/dag_run_endpoint.py:
##########
@@ -280,6 +285,12 @@ def get_dag_runs_batch(*, session: Session = NEW_SESSION) 
-> APIResponse:
     ],
 )
 @provide_session
+@action_logging(
+    event=action_event_from_permission(
+        prefix="log",

Review Comment:
   We can have a global constant for this prefix. Check the usage in other 
places. 



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