This is an automated email from the ASF dual-hosted git repository.
amoghdesai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3a9fad1667d Decouple xcom public API from using XcomEncoder (#58900)
3a9fad1667d is described below
commit 3a9fad1667d0cd78ddd8dfad45834401ed8460d4
Author: Amogh Desai <[email protected]>
AuthorDate: Thu Dec 4 13:54:45 2025 +0530
Decouple xcom public API from using XcomEncoder (#58900)
---
.../src/airflow/api_fastapi/core_api/routes/public/xcom.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py
b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py
index c05ae6246a8..776405d3fc1 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py
@@ -17,6 +17,7 @@
from __future__ import annotations
import copy
+import json
from typing import Annotated
from fastapi import Depends, HTTPException, Query, status
@@ -256,7 +257,7 @@ def create_xcom_entry(
)
try:
- value = XComModel.serialize_value(request_body.value)
+ value = json.dumps(request_body.value)
except (ValueError, TypeError):
raise HTTPException(
status.HTTP_400_BAD_REQUEST, f"Couldn't serialise the XCom with
key: `{request_body.key}`"
@@ -314,7 +315,7 @@ def update_xcom_entry(
) -> XComResponseNative:
"""Update an existing XCom entry."""
# Check if XCom entry exists
- xcom_new_value = XComModel.serialize_value(patch_body.value)
+ xcom_new_value = json.dumps(patch_body.value)
xcom_entry = session.scalar(
select(XComModel)
.where(
@@ -335,6 +336,6 @@ def update_xcom_entry(
)
# Update XCom entry
- xcom_entry.value = XComModel.serialize_value(xcom_new_value)
+ xcom_entry.value = json.dumps(xcom_new_value)
return XComResponseNative.model_validate(xcom_entry)