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

Serialization that works with Json codec does not work with protobuf #144

Closed
vigoo opened this issue Apr 2, 2022 · 1 comment
Closed

Comments

@vigoo
Copy link
Contributor

vigoo commented Apr 2, 2022

ISSUE

This is in fact (very likely) a zio-schema issue, but it is reproducible with zio-flow tests.
Serialization of remote values in zio-flow is implemented using zio-schema. The library defines the schema of all the remote types we have, and the actual serialization is the responsibility of a zio-schema codec. This allows us to switch between different serialization formats without implementing codecs for them one by one.

There is a test suite that performs roundtrip serialization tests for all the supported zio-flow remote types: serializing with a given codec, then reading back and comparing the result with the original value.

The issue is that this test passes with the JSON codec, but fails with protobuf.

SOLUTION

Solving this issue requires debugging the protobuf implementation in zio-schema, comparing it with the JSON codec. Ideally the fix would be in zio-schema with a test reproducing the issue there. If that works you can also enable the roundtrip serialization tests in zio-flow for the protobuf codec.

IMPACT

Fixing this problem is potentially a fix for all libraries that want to serialize with zio-schema using the protobuf codec.

WHERE TO LOOK

@petoalbert
Copy link
Contributor

I can check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants