Skip to content

opentelemetry-proto: bump maximum supported protobuf version to 7.x.x#5251

Open
herin049 wants to merge 4 commits into
open-telemetry:mainfrom
herin049:misc/bump-protobuf
Open

opentelemetry-proto: bump maximum supported protobuf version to 7.x.x#5251
herin049 wants to merge 4 commits into
open-telemetry:mainfrom
herin049:misc/bump-protobuf

Conversation

@herin049

Copy link
Copy Markdown
Contributor

Description

Bumps the maximum supported protobuf to 7.x.x. Per the protobuf docs:

Since the 3.20.0 release, the Protobuf Python generated code became a thin wrapper around an embedded FileDescriptorProto. Because these protos are supported on extremely long timeframes, our usual major version compatibility windows aren’t typically necessary.

Python may break generated code compatibility in specific future major version releases, but it will be coupled with poison pill warnings and errors in advance. As of 6.32.0, all generated code since 3.20.0 will be supported until at least 8.x.y.

This change should be safe to make.

Fixes #5205

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tox

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated

@herin049 herin049 requested a review from a team as a code owner May 27, 2026 01:26
@tammy-baylis-swi tammy-baylis-swi moved this to Ready for review in Python PR digest Jun 9, 2026
@tammy-baylis-swi

Copy link
Copy Markdown
Contributor

Thanks @herin049 ! I think this looks good. I had a thought to maybe also do scripts/proto_codegen.sh with version 7 but with the compatibility considerations it's probably ok?

@herin049

herin049 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @herin049 ! I think this looks good. I had a thought to maybe also do scripts/proto_codegen.sh with version 7 but with the compatibility considerations it's probably ok?

From my understanding, we actually don't want to perform a re-generation since this would break backwards compatibility. From the ProtoBuf docs, it states that:

Since the 3.20.0 release, the Protobuf Python generated code became a thin wrapper around an embedded FileDescriptorProto. Because these protos are supported on extremely long timeframes, our usual major version compatibility windows aren’t typically necessary.

Python may break generated code compatibility in specific future major version releases, but it will be coupled with poison pill warnings and errors in advance. As of 6.32.0, all generated code since 3.20.0 will be supported until at least 8.x.y.

Based on this, we should be able to support at least Protobuf 8.x.y without having to regenerate any code.

@tammy-baylis-swi tammy-baylis-swi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@github-project-automation github-project-automation Bot moved this from Ready for review to Approved PRs in Python PR digest Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

Support protobuf 7.x in opentelemetry-proto

2 participants