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


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py:
##########
@@ -347,9 +347,10 @@ def update_xcom_entry(
             f"The XCom with key: `{xcom_key}` with mentioned task instance 
doesn't exist.",
         )
 
-    # Update XCom entry
+    # Update XCom entry and persist
     xcom_entry.value = json.dumps(patch_body.value)
-
+    session.flush()
+    # Return the already updated object (relationships should be loaded)

Review Comment:
   That shouldn't fix the related issue because the backend is already 
returning the appropriate response.
   
   
https://github.com/user-attachments/assets/b614eae2-4c1e-4e91-8d94-08f789b9cf5b



##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_xcom.py:
##########
@@ -806,6 +806,35 @@ def test_patch_xcom_entry(self, key, patch_body, 
expected_status, expected_detai
         else:
             assert response.json()["detail"] == expected_detail
         check_last_log(session, dag_id=TEST_DAG_ID, event="update_xcom_entry", 
logical_date=None)
+    def test_patch_xcom_entry_api(self, test_client, session):

Review Comment:
   This test is green without your change on the 'xcom' side.



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