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

Flag to deserialize value on custom XCom backend #26343

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

uranusjr
Copy link
Member

This adds an optional deserialize=true query param to the XCom entry retrieval endpoint. When set, the webserver would call deserialize_value against the XCom entry, instead of the cheaper orm_deserialize_value, for the user to retrieve the "real" XCom value.

Fix #26174.

This adds an optional 'deserialize=true' query param to the XCom entry
retrieval endpoint. When set, the webserver would call deserialize_value
against the XCom entry, instead of the cheaper orm_deserialize_value,
for the user to retrieve the "real" XCom value.
@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Sep 12, 2022
@uranusjr uranusjr merged commit ffee6bc into apache:main Sep 12, 2022
@uranusjr uranusjr deleted the api-xcom-deserialize branch September 12, 2022 21:05
potiuk pushed a commit that referenced this pull request Sep 14, 2022
@potiuk potiuk added this to the Airflow 2.4.0 milestone Sep 14, 2022
@potiuk
Copy link
Member

potiuk commented Sep 14, 2022

Hey @uranusjr - FYI I cherry-picked that one also to 2.4.0 as the only change needed to synchronize 2.4 branch and PEP-563 changes

@uranusjr
Copy link
Member Author

Thie one marks the new addition as New in 2.5.0, if it’s being cherry-picked into 2.4 that needs to changed.

ephraimbuddy pushed a commit that referenced this pull request Sep 14, 2022
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Nov 16, 2022
@bolkedebruin
Copy link
Contributor

bolkedebruin commented Nov 17, 2022

@uranusjr I intend to remove this feature as I think this is potentially a security issue in the webserver, particularly after #27540 gets merged which imports the class referenced to. Custom XCom backends as referenced in #26174 should implement their own orm_deserialize_value if they have a need for a full deserialization. However, my suggestion would be to implement deserialization on the client side.

cc @herunyu @ashb

@bolkedebruin bolkedebruin removed the type:bug-fix Changelog: Bug Fixes label Nov 17, 2022
@ephraimbuddy ephraimbuddy added the type:new-feature Changelog: New Features label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API Endpoints - /xcomEntries/{xcom_key} cannot deserialize customized xcom backend
5 participants