amoghrajesh commented on code in PR #69821:
URL: https://github.com/apache/airflow/pull/69821#discussion_r3710617010


##########
airflow-core/src/airflow/models/trigger.py:
##########
@@ -604,10 +626,22 @@ def _submit_callback_if_necessary() -> None:
 
     def _push_xcoms_if_necessary() -> None:
         """Pushes XComs to the database if they are provided."""
-        if event.xcoms:
+        if event.xcoms and callback_type != TaskInstanceState.UP_FOR_RETRY:
             for key, value in event.xcoms.items():
                 task_instance.xcom_push(key=key, value=value)
 
+    # Send the callback before handle_failure (mirrors the scheduler 
executor-event ordering):
+    # the callback request should reflect the retry/terminal decision derived 
above.

Review Comment:
   This is factually wrong? There is no call to `handle_failure` anywhere?



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