Skip to content

Commit

Permalink
Fix XCom value deserialization in Task SDK (apache#45254)
Browse files Browse the repository at this point in the history
Fixing this so main works with most of the XCom example. But proper fix will be part of apache#45231
  • Loading branch information
kaxil authored and jason810496 committed Dec 28, 2024
1 parent 24f9fd2 commit 6b97d77
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions task_sdk/src/airflow/sdk/execution_time/task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,12 @@ def xcom_pull(
if TYPE_CHECKING:
assert isinstance(msg, XComResult)

value = msg.value
if value is not None:
if msg.value is not None:
from airflow.models.xcom import XCom

# TODO: Move XCom serialization & deserialization to Task SDK
# https://github.com/apache/airflow/issues/45231
return XCom.deserialize_value(value)
return XCom.deserialize_value(msg) # type: ignore[arg-type]
return default

def xcom_push(self, key: str, value: Any):
Expand Down

0 comments on commit 6b97d77

Please sign in to comment.