This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch sync_v2_10_test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 93311cb6b5b5290626f7396804caff723992effc
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Sep 6 08:36:53 2024 +0200

    Add note about dataclasses and attrs to XComs page (#42045) (#42056)
    
    * Add note about dataclasses and attrs to XComs page
    
    The [XCom 
page](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/xcoms.html)
 doesn't make explicit reference to `dataclass` and `attrs.define`, although 
the TaskFlow page does. This adds a note for those looking at the possible 
limitations of XCom types with a reference to where XCom type constraints are 
also discussed.
    
    (cherry picked from commit 9a5f27f6dc560dcf456cabb793a32a61eab98dea)
    
    Co-authored-by: Madison Swain-Bowden <[email protected]>
---
 docs/apache-airflow/core-concepts/taskflow.rst | 2 ++
 docs/apache-airflow/core-concepts/xcoms.rst    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/apache-airflow/core-concepts/taskflow.rst 
b/docs/apache-airflow/core-concepts/taskflow.rst
index 60a14717ef..3a61f5f3b0 100644
--- a/docs/apache-airflow/core-concepts/taskflow.rst
+++ b/docs/apache-airflow/core-concepts/taskflow.rst
@@ -88,6 +88,8 @@ To use logging from your task functions, simply import and 
use Python's logging
 
 Every logging line created this way will be recorded in the task log.
 
+.. _concepts:arbitrary-arguments:
+
 Passing Arbitrary Objects As Arguments
 --------------------------------------
 
diff --git a/docs/apache-airflow/core-concepts/xcoms.rst 
b/docs/apache-airflow/core-concepts/xcoms.rst
index 4fb4e1b142..cd3851e396 100644
--- a/docs/apache-airflow/core-concepts/xcoms.rst
+++ b/docs/apache-airflow/core-concepts/xcoms.rst
@@ -23,7 +23,7 @@ XComs
 
 XComs (short for "cross-communications") are a mechanism that let :doc:`tasks` 
talk to each other, as by default Tasks are entirely isolated and may be 
running on entirely different machines.
 
-An XCom is identified by a ``key`` (essentially its name), as well as the 
``task_id`` and ``dag_id`` it came from. They can have any (serializable) 
value, but they are only designed for small amounts of data; do not use them to 
pass around large values, like dataframes.
+An XCom is identified by a ``key`` (essentially its name), as well as the 
``task_id`` and ``dag_id`` it came from. They can have any serializable value 
(including objects that are decorated with ``@dataclass`` or ``@attr.define``, 
see :ref:`TaskFlow arguments <concepts:arbitrary-arguments>`:), but they are 
only designed for small amounts of data; do not use them to pass around large 
values, like dataframes.
 
 XComs are explicitly "pushed" and "pulled" to/from their storage using the 
``xcom_push`` and ``xcom_pull`` methods on Task Instances.
 

Reply via email to