ashb commented on code in PR #46613:
URL: https://github.com/apache/airflow/pull/46613#discussion_r1948767468


##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -717,7 +717,11 @@ def _push_xcom_if_needed(result: Any, ti: 
RuntimeTaskInstance):
     _xcom_push(ti, "return_value", result, mapped_length=mapped_length)
 
 
-def finalize(log: Logger): ...
+def finalize(ti: RuntimeTaskInstance, log: Logger):
+    for oe in ti.task.operator_extra_link_dict.values():
+        link, xcom_key = oe.get_link(operator=ti.task, ti_key=ti.id), 
oe.xcom_key  # type: ignore[arg-type]
+        log.debug("Setting xcom for operator extra link", link=link, 
xcom_key=xcom_key)
+        _xcom_push(ti, key=xcom_key, value=link)

Review Comment:
   Question on previous behaviuor? Where links available for failed tasks? I 
guess they were (in which case this is the right place to do it.)



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