Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make XCom.get_one return full, not abbreviated values #18274

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

ashb
Copy link
Member

@ashb ashb commented Sep 15, 2021

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.

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.
Comment on lines +192 to +193
This function returns an SQLAlchemy query of full XCom objects. If you just want one stored value then
use :meth:`get_one`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Sep 15, 2021
@github-actions
Copy link

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.

@uranusjr uranusjr mentioned this pull request Sep 16, 2021
@uranusjr uranusjr added this to the Airflow 2.2 milestone Sep 16, 2021
@ashb ashb merged commit f8ba475 into apache:main Sep 16, 2021
@ashb ashb deleted the xcom-getvalue branch September 16, 2021 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants