KoviAnusha commented on code in PR #57452:
URL: https://github.com/apache/airflow/pull/57452#discussion_r2476501630
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:
##########
Review Comment:
As per the discussion with Jens, this has been removed.
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py:
##########
@@ -335,6 +334,12 @@ def update_xcom_entry(
)
# Update XCom entry
- xcom_entry.value = XComModel.serialize_value(xcom_new_value)
+ xcom_entry.value = XComModel.serialize_value(patch_body.value)
- return XComResponseNative.model_validate(xcom_entry)
+ # Create a copy and set the raw value like in the GET endpoint
+ import copy
+
+ item = copy.copy(xcom_entry)
+ item.value = xcom_entry.value
Review Comment:
As 'xcom_entry' is a SQLAlchemy model instance from the database. Directly
modifying xcom_entry.value would mutate the original database object. To avoid
mutation of the database object, I have used copy command.
--
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]