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


##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -346,11 +348,15 @@ def get_relevant_upstream_map_indexes(
 def _xcom_push(ti: RuntimeTaskInstance, key: str, value: Any, mapped_length: 
int | None = None) -> None:
     # Private function, as we don't want to expose the ability to manually set 
`mapped_length` to SDK
     # consumers
-    from airflow.models.xcom import XCom
+    from airflow.serialization.serde import serialize
 
     # TODO: Move XCom serialization & deserialization to Task SDK
     #   https://github.com/apache/airflow/issues/45231
-    value = XCom.serialize_value(value)
+
+    # The execution API server now deals in json compliant objects.
+    # It is responsibility of the client to handle any non native object 
serialization.
+    # serialize does just that.
+    value = serialize(value)

Review Comment:
   Resolving for now to merge, we can discuss in a follow up



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