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

fix: Upgrade protobuf from 21.7 to 23.1/24.4 #1833

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,12 @@ tasks:
working_directory: examples/py_proto_library
platform: macos
integration_test_py_proto_library_windows_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/py_proto_library: Windows, workspace"
working_directory: examples/py_proto_library
platform: windows
build_targets: ["//..."] # Building everything triggers problems in protobuf
test_targets: ["//..."]

integration_test_pip_repository_annotations_ubuntu_workspace:
<<: *reusable_build_test_all
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bazel_dep(name = "platforms", version = "0.0.4")

# Those are loaded only when using py_proto_library
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")

internal_deps = use_extension("//python/private/bzlmod:internal_deps.bzl", "internal_deps")
internal_deps.install()
Expand Down
2 changes: 1 addition & 1 deletion examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local_path_override(
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")

# (py_proto_library specific) Add the protobuf library for well-known types (e.g. `Any`, `Timestamp`, etc)
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")

# We next initialize the python toolchain using the extension.
# You can set different Python versions in this block.
Expand Down
11 changes: 7 additions & 4 deletions examples/py_proto_library/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ http_archive(

http_archive(
name = "com_google_protobuf",
sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae",
strip_prefix = "protobuf-21.7",
sha256 = "4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8",
strip_prefix = "protobuf-26.1",
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v26.1.tar.gz",
],
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

rules_proto_dependencies()
Expand Down
7 changes: 3 additions & 4 deletions internal_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,10 @@ def rules_python_internal_deps():

http_archive(
name = "com_google_protobuf",
sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae",
strip_prefix = "protobuf-21.7",
sha256 = "d19643d265b978383352b3143f04c0641eea75a75235c111cc01a1350173180e",
strip_prefix = "protobuf-25.3",
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v25.3.tar.gz",
],
)

Expand Down
Loading