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


##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1569,7 +1570,11 @@ def _on_term(signum, frame):
     try:
         # First, clear the xcom data sent from server
         if ti._ti_context_from_server and (keys_to_delete := 
ti._ti_context_from_server.xcom_keys_to_clear):
+            link_xcom_keys = {oe.xcom_key for oe in 
ti.task.operator_extra_links}
             for x in keys_to_delete:
+                if is_link_xcom_key(x, link_xcom_keys):
+                    # skip clearing this key as it is an operator link
+                    continue

Review Comment:
   Nice, thanks. Moved it to the server. `ti_run` now resolves the task's link 
xcom_keys from the cached serdag and leaves them out of `xcom_keys_to_clear`, 
so the client just deletes what it is given. 
   
   



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