Skip to content

Commit e4a4410

Browse files
authored
Regenerate opentelemetry-proto to be compatible with protobuf 3 and 4 (#3070)
1 parent edd6796 commit e4a4410

File tree

19 files changed

+278
-3610
lines changed

19 files changed

+278
-3610
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
strategy:
8888
fail-fast: false
8989
matrix:
90-
tox-environment: [ "docker-tests", "lint", "spellcheck", "docs", "mypy", "mypyinstalled", "tracecontext" ]
90+
tox-environment: [ "docker-tests-proto3", "docker-tests-proto4", "lint", "spellcheck", "docs", "mypy", "mypyinstalled", "tracecontext" ]
9191
name: ${{ matrix.tox-environment }}
9292
runs-on: ubuntu-20.04
9393
steps:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Regenerate opentelemetry-proto to be compatible with protobuf 3 and 4
11+
([#3070](https://github.com/open-telemetry/opentelemetry-python/pull/3070))
1012
- Rename parse_headers to parse_env_headers and improve error message
1113
([#2376](https://github.com/open-telemetry/opentelemetry-python/pull/2376))
1214
- Add url decode values from OTEL_RESOURCE_ATTRIBUTES

dev-requirements.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ sphinx-autodoc-typehints~=1.12.0
1010
pytest==7.1.3
1111
pytest-cov>=2.8
1212
readme-renderer~=24.0
13-
grpcio-tools~=1.41.0
13+
# This version of grpcio-tools ships with protoc 3.19.4 which appears to be compatible with
14+
# both protobuf 3.19.x and 4.x (see https://github.com/protocolbuffers/protobuf/issues/11123).
15+
# Bump this version with caution to preserve compatibility with protobuf 3.
16+
# https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-proto/pyproject.toml#L28
17+
grpcio-tools==1.48.1
1418
mypy-protobuf~=3.0.0
15-
protobuf~=3.18.1
1619
# temporary fix. we should update the jinja, flask deps
1720
# See https://github.com/pallets/markupsafe/issues/282
1821
# breaking change introduced in markupsafe causes jinja, flask to break

docs-requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ wrapt>=1.0.0,<2.0.0
2323
# See https://github.com/pallets/markupsafe/issues/282
2424
# breaking change introduced in markupsafe causes jinja, flask to break
2525
markupsafe==2.0.1
26+
27+
# Jaeger generated protobufs do not currently support protobuf 4.x. This can be removed once
28+
# they're regenerated.
29+
protobuf~=3.19

opentelemetry-proto/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ classifiers = [
2525
"Programming Language :: Python :: 3.11",
2626
]
2727
dependencies = [
28-
"protobuf~=3.13",
28+
"protobuf>=3.19, < 5.0",
2929
]
3030

3131
[project.optional-dependencies]

opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py

Lines changed: 15 additions & 99 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py

Lines changed: 15 additions & 99 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)