Skip to content

Commit

Permalink
Fix XCom value deserialization in Task SDK
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 committed Dec 27, 2024
1 parent 9be5971 commit 1a773c6
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 1a773c6

Please sign in to comment.