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

SR: Encoder and decoder #1096

Merged
merged 4 commits into from
Jul 14, 2023
Merged

SR: Encoder and decoder #1096

merged 4 commits into from
Jul 14, 2023

Conversation

lovromazgon
Copy link
Member

@lovromazgon lovromazgon commented Jun 30, 2023

Description

This PR is based on top of #1051 and #1083, only the last 2 commits are relevant. Diff will look better once those PRs are merged and this branch is rebased. Rebased ✅

This PR adds a schema registry Encoder and Decoder. Currently the only format they support is Avro. These two objects tie together the client from #1048 and the Avro functionality in #1051.

The Encoder exposes two strategies:

  • ExtractAndUploadSchemaStrategy extracts the schema from the structured data and uploads it to the schema registry
  • DownloadSchemaStrategy always downloads the schema from the schema registry (of course with caching)

There are 2 TODOs left, one is a noop until we add support for protobuf, the other is a matter of priority and is captured in #1095.

Fixes #1042 and #1043

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lovromazgon lovromazgon requested a review from a team as a code owner June 30, 2023 16:58
@lovromazgon lovromazgon mentioned this pull request Jun 30, 2023
4 tasks
pkg/processor/schemaregistry/client_fake_test.go Outdated Show resolved Hide resolved
pkg/processor/schemaregistry/encoder.go Outdated Show resolved Hide resolved
@lovromazgon lovromazgon merged commit d036f1f into main Jul 14, 2023
3 checks passed
@lovromazgon lovromazgon deleted the lovro/sr-encoder-decoder branch July 14, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SR: Create Serializer
2 participants