bugraoz93 commented on code in PR #61493:
URL: https://github.com/apache/airflow/pull/61493#discussion_r2771057446


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py:
##########
@@ -350,7 +350,26 @@ def update_xcom_entry(
     # Update XCom entry
     xcom_entry.value = json.dumps(patch_body.value)
 
-    return XComResponseNative.model_validate(xcom_entry)
+    # Persist the change and re-load the XCom with related objects so the
+    # response contains the fully populated XCom (including task and dag_run
+    # display fields) — consistent with create_xcom_entry behavior and UI
+    # expectations.
+    session.flush()
+
+    xcom = session.scalar(

Review Comment:
   I think we should be able to make this persistent in the db without calling 
it twice. session.flush() already make sense. Whats happening is when edited 
the value saved as empty otherwise get shouldn't be able to return value empty.
   Above xcom_entry already updates the value we should make that persistent 
rather hittin db second time 



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