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

Support for protobuf base64 encoded descriptors. #398

Closed
perj opened this issue Apr 26, 2022 · 1 comment
Closed

Support for protobuf base64 encoded descriptors. #398

perj opened this issue Apr 26, 2022 · 1 comment

Comments

@perj
Copy link

perj commented Apr 26, 2022

What is currently missing?

When using confluent-kafka-python as a Schema Registry client, it will upload a binary descriptor, you can see an example of a such here:
https://github.com/confluentinc/confluent-kafka-python/blob/e7e066120f05ca6f9c37b18d77f974f1a6cad222/examples/user_pb2.py#L22
That example will generate this POST request to /subjects/subject/versions:

{"schemaType": "PROTOBUF", "schema": "Cgp1c2VyLnByb3RvIkUKBFVzZXISDAoEbmFtZRgBIAEoCRIXCg9mYXZvcml0ZV9udW1iZXIYAiABKAMSFgoOZmF2b3JpdGVfY29sb3IYAyABKAliBnByb3RvMw=="}

This works when using CSR. When fetching back the subject, a textual representation is returned, a normalized form of https://github.com/confluentinc/confluent-kafka-python/blob/e7e066120f05ca6f9c37b18d77f974f1a6cad222/examples/user.proto

Karapace doesn't support this. It requires the textual represenation to be sent, making it incompatible with conluent-kafka-python.

How could this be improved?

GetDebugString() added here: protocolbuffers/protobuf#7498
returns this normalized form and should be applied server-side instead of having to do that before sending the request .

Is this a feature you would work on yourself?

[ ] I plan to open a pull request for this feature

@tvainika
Copy link
Contributor

Implemented in #755

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

No branches or pull requests

2 participants