Skip to content

Add support for Protobuf 5 #3958

Closed
Closed
@aabmass

Description

@aabmass

Protobuf 5 was released but it currently conflicts with opentelemetry-proto package

dependencies = [
"protobuf>=3.19, < 5.0",
]

This is by design since protobuf generated code is supposed to match the runtime protobuf library version. When 4.x was released we had a lot of issues and I opened protocolbuffers/protobuf#11123 to get some clarification. We know have some docs https://protobuf.dev/support/cross-version-runtime-guarantee/ which make it clear New Gencode + Old Runtime = Never Allowed. I.e. regenerating code with grpcio-tools 5 will break compatibility with protobuf 4.

This puts us in a tricky spot of choosing which major version to support. The good news is

Starting with the 2025Q1 release, the protobuf project will adopt a rolling compatibility window for major versions..

That doesn't help right now, but hopefully will for the next major version. Because they are planning to fix things, I'm hesitant on making our own solution like keeping two copies of generated code and dynamically choosing between them at import time.


Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p1Issues that should be resolved in the upcoming release (except for zero-day hotfix release)proto

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions