fediabdelhedi commented on code in PR #56710:
URL: https://github.com/apache/airflow/pull/56710#discussion_r2435190440


##########
airflow-core/src/airflow/dag_processing/processor.py:
##########
@@ -294,17 +294,47 @@ def _execute_dag_callbacks(dagbag: DagBag, request: 
DagCallbackRequest, log: Fil
 
 
 def _execute_task_callbacks(dagbag: DagBag, request: TaskCallbackRequest, log: 
FilteringBoundLogger) -> None:
+   
+    ti = getattr(request, "ti", None)
+    dag_id_for_log = getattr(ti, "dag_id", None)
+    task_id_for_log = getattr(ti, "task_id", None)
+    run_id_for_log = getattr(ti, "run_id", None)

Review Comment:
   Thanks for the feedback! I've updated the code to:
   - Remove the separate `dag_id_for_log` variables
   - Add an explicit `ti is None` check to satisfy MyPy
   - Use inline safe access for the early warning log
   
   This should address both the review feedback and the MyPy type checking 
errors.



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