Navigation Menu

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

narrow protobuf dependencies to exclude protobuf >= 4 #2720

Merged
merged 1 commit into from May 26, 2022
Merged

narrow protobuf dependencies to exclude protobuf >= 4 #2720

merged 1 commit into from May 26, 2022

Conversation

TBBle
Copy link
Contributor

@TBBle TBBle commented May 26, 2022

This is a stop-gap until the generated code can be updated with a newer
version of protoc, as required by the protobuf 4.x release.

Description

protobuf 4.x requires that the generated files be generated with a newer version of protoc than has been used.

This is a historical breakage (i.e. affects previously released versions), so this is a simple fix that could be trivially backported to previous releases if desired.

Many existing protobuf dependencies are already more-tightly defined, so I didn't touch those.

Fixes #2717

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • CI run
  • pip

Pip test

In a clean venv, install the changed packages and force protobuf>4 (i.e. the incompatible version)

python -m pip install --upgrade --upgrade-strategy eager .\opentelemetry-python\opentelemetry-proto\ .\opentelemetry-python\exporter\opentelemetry-exporter-opencensus .\opentelemetry-python\exporter/opentelemetry-exporter-zipkin-proto-http protobuf>4

This succeeds in main.

With this PR, the same command fails (as expected)

ERROR: Cannot install opentelemetry-proto==1.12.0rc1 and protobuf>4 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested protobuf>4
    opentelemetry-proto 1.12.0rc1 depends on protobuf~=3.13.0

Note that right now, this test must explicitly specify protobuf>4 because the protobuf 4.x release package has been yanked, so it's no longer selected by default. Had this not been done, the test for this PR would have successfully installed, but chosen an earlier version of protobuf.

Does This PR Require a Contrib Repo Change?

  • No.

There's a matching PR at open-telemetry/opentelemetry-python-contrib#1109 though.

Checklist:

  • Changelogs have been updated

This is a stop-gap until the generated code can be updated with a newer
version of protoc, as required by the protobuf 4.x release.
@srikanthccv srikanthccv merged commit 77b4799 into open-telemetry:main May 26, 2022
@TBBle TBBle deleted the restrict-protobuf-to-3.x branch May 27, 2022 22:12
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.

opentelemetry-exporter-otlp-proto-grpc breaks with protobuf 4.21.0
4 participants