ferruzzi commented on code in PR #75363:
URL: https://github.com/apache/airflow/pull/75363#discussion_r4448712176


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -890,13 +890,23 @@ def _create_workload(
             if trigger.assets:
                 watched_assets = {a.name: a.uri for a in trigger.assets}
 
+            dag_run_data = None
             if callback := getattr(trigger, "callback", None):
-                # Log callback triggers to a file the UI callback logs 
endpoint can read.
                 callback_data = callback.data or {}
-                context = (callback_data.get("kwargs") or {}).get("context") 
or {}
-                dag_run_data = context.get("dag_run") or {}
-                dag_id = callback_data.get("dag_id") or 
dag_run_data.get("dag_id") or "unknown"
-                run_id = dag_run_data.get("dag_run_id") or "unknown"
+                dag_run_data = 
self._fetch_callback_dag_run_data(callback_data, session=session)
+                if dag_run_data is None and callback_data.get("run_id"):

Review Comment:
   I don't think this is blocking, but the executor version of this at 
`callback_supervisor.py:331` exits 1 so the callback is marked failed.  I'm not 
sure if we want to make them both exit 1 or if there is a reason to have a 
different behavior here.  Other than that, LGTM I think.



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