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 dependency to exclude protobuf >= 4 #1109

Merged
merged 1 commit into from May 26, 2022
Merged

Narrow protobuf dependency to exclude protobuf >= 4 #1109

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.

Part of open-telemetry/opentelemetry-python#2717 (No corresponding bug lodged here)

The failure is visible in CI run for #1108 though.

Type of change

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

How Has This Been Tested?

  • CI run
  • pip

Pip Test

In a clean venv, with opentelementy-python main at .\open-telemetry-python, and this branch at \opentelemetry-python-contrib:

python -m pip install --upgrade --upgrade-strategy eager -e .\opentelemetry-python-contrib\instrumentation\opentelemetry-instrumentation-grpc[test] .\opentelemetry-python-contrib\opentelemetry-instrumentation\ .\opentelemetry-python\opentelemetry-semantic-conventions\ .\opentelemetry-python\opentelemetry-api\ .\opentelemetry-python\opentelemetry-sdk\  protobuf>4

passes.

WIth this PR, it fails:

ERROR: Cannot install opentelemetry-instrumentation-grpc[test]==0.31b0 and protobuf>4 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested protobuf>4
    opentelemetry-instrumentation-grpc[test] 0.31b0 depends on protobuf~=3.13

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 Core Repo Change?

  • No.

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

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Changelogs have been updated

@TBBle TBBle requested a review from a team as a code owner May 26, 2022 15:54
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 9d57a4c into open-telemetry:main May 26, 2022
@TBBle TBBle deleted the restrict-protobuf-to-3.x branch May 27, 2022 22:11
jeremydvoss pushed a commit to jeremydvoss/opentelemetry-python-contrib that referenced this pull request Jun 2, 2022
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.

None yet

2 participants