Skip to content

Support for protobuf base64 encoded descriptors. #398

@perj

Description

@perj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions