Skip to content

Use correct JsonPath config on history serialization #1041

New issue

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

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

Already on GitHub? # to your account

Conversation

Spikhalskiy
Copy link
Contributor

What was changed

Use the same JSON_PATH_CONFIGURATION during history serialization as we use during deserialization. It allows ignoring exceptions caused by the absence of the path intended for conversion in the source Json.

Why?

JsonPath upgrade performed in #1020 brought an incompatible change that requires specifying of JsonPath config to achieve an old behavior of JsonPath (ignoring an absence of a path intended for transformation). This config was originally applied in #1020 only history deserialization and left serialization broken in some cases.

How was this tested:

Added a unit test for bidirectional transformation to make sure the history serialization/deserialization works in both directions and preserves the result.

@Spikhalskiy Spikhalskiy force-pushed the history-serialization-json-path-config branch from 9f909bc to 42a78ae Compare February 17, 2022 00:44
@Spikhalskiy Spikhalskiy force-pushed the history-serialization-json-path-config branch from 42a78ae to 8dd08c4 Compare February 17, 2022 04:22
@Spikhalskiy Spikhalskiy merged commit cc3444c into temporalio:master Feb 17, 2022
@Spikhalskiy Spikhalskiy deleted the history-serialization-json-path-config branch March 1, 2022 06:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants