You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/09 18:30:40 UTC

[GitHub] [airflow] dstandish commented on a change in pull request #19505: Add params dag_id, task_id etc to XCom.serialize_value

dstandish commented on a change in pull request #19505:
URL: https://github.com/apache/airflow/pull/19505#discussion_r802971199



##########
File path: airflow/models/xcom.py
##########
@@ -499,6 +509,27 @@ def orm_deserialize_value(self) -> Any:
         return BaseXCom.deserialize_value(self)
 
 
+def serialize_value_shim(**kwargs):
+    """
+    Previously XCom.serialize_value only accepted one argument ``value``.  In order to give
+    custom XCom backends more flexibility with how they store values we now forward to
+    ``XCom.serialize_value`` all params passed to ``XCom.set``.  In order to maintain
+    compatibility with XCom backends written with the old signature we need to use this
+    compatibility shim, which forwards only those kwargs which are accepted by the
+    XCom backend.

Review comment:
       nice, thanks




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org