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 2021/09/15 16:06:41 UTC

[GitHub] [airflow] ashb opened a new pull request #18274: Make `XCom.get_one` return full, not abbreviated values

ashb opened a new pull request #18274:
URL: https://github.com/apache/airflow/pull/18274


   If you used this class method directly (such as in a custom operator link) then the value would _always_ be subject to the `orm_deserialize_value` which would likely give the wrong result on custom XCom backends.
   
   This wasn't a problem for anyone using `ti.xcom_pull` as it handled this directly.


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



[GitHub] [airflow] ashb commented on a change in pull request #18274: Make `XCom.get_one` return full, not abbreviated values

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #18274:
URL: https://github.com/apache/airflow/pull/18274#discussion_r710067831



##########
File path: airflow/models/xcom.py
##########
@@ -182,6 +189,9 @@ def get_many(
 
         ``run_id`` and ``execution_date`` are mutually exclusive.
 
+        This function returns an SQLAlchemy query of full XCom objects. If you just want one stored value then
+        use :meth:`get_one`.

Review comment:
       I think a more whole-sale reworking of this to make the serde handled automatically is in order, so I'm going to leave this as is for now.




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



[GitHub] [airflow] ashb merged pull request #18274: Make `XCom.get_one` return full, not abbreviated values

Posted by GitBox <gi...@apache.org>.
ashb merged pull request #18274:
URL: https://github.com/apache/airflow/pull/18274


   


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



[GitHub] [airflow] uranusjr commented on a change in pull request #18274: Make `XCom.get_one` return full, not abbreviated values

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #18274:
URL: https://github.com/apache/airflow/pull/18274#discussion_r709363315



##########
File path: airflow/models/xcom.py
##########
@@ -182,6 +189,9 @@ def get_many(
 
         ``run_id`` and ``execution_date`` are mutually exclusive.
 
+        This function returns an SQLAlchemy query of full XCom objects. If you just want one stored value then
+        use :meth:`get_one`.

Review comment:
       Perhaps also mention `with_entities()` for people who want a list of values? (If that’s a meaningful use case.)




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



[GitHub] [airflow] github-actions[bot] commented on pull request #18274: Make `XCom.get_one` return full, not abbreviated values

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #18274:
URL: https://github.com/apache/airflow/pull/18274#issuecomment-920185308


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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