Update Protobuf Bazel Workspace#7094
Open
psamanoelton wants to merge 8 commits intotensorflow:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TensorBoard 2.21: Bazel 7.7.0 + protobuf 6.31.1 upgrade
Summary
This PR upgrades the local TensorBoard
2.21branch to:7.7.06.31.11.74.0The goal is to align TensorBoard's local/source build more closely with TensorFlow
2.21while preserving:bazel test //tensorboard/...What changed
1. Bazel 7.7.0 migration
7.7.0.6.xto7.7.0+.--noenable_bzlmod--incompatible_default_to_explicit_init_py2. protobuf 6.31.1 alignment
6.31.1.1.74.0.py_proto_libraryandpy_grpc_libraryinstead of older protobuf internals removed in newer protobuf/rules stacks.3. WORKSPACE / external repo compatibility
tb_http_archivehelper in third_party/repo.bzl for mirrored downloads and patch application.rules_ccrules_javaabsl4. rules_closure / Soy / Java compatibility
rules_closureCLI usage in patches/rules_closure_soy_cli.patch.5. TensorBoard compat / Bazel Python behavior
importlib.import_module(...)for safer loading.__init__.pyexplicitly.6. Test and runtime environment hardening
7. Plugin summary import fixes
tf2resolution inno_tensorflowpaths:8. Miscellaneous compatibility fixes
rules_webtesting.Validation
Validated locally in Docker against a fresh clone of the
protobufbranch.Commands used:
Additional manual runtime check:
Important notes for reviewers
Why
test --incompatible_default_to_explicit_init_pyis test-onlyUsing this flag globally fixed Bazel test runfiles but broke wheel packaging by changing the package tree copied into the pip wheel build. Scoping it to
testkeeps:test_pip_packagegreenWhy
third_party/safe_html_typesis vendoredThis is the largest part of the diff. It is included because the older Closure/Soy stack used by TensorBoard expects safe-html-types classes that remain compatible with protobuf-java 6.x. Without this vendored copy, the Bazel 7 / protobuf 6 migration fails later in Java/Soy tooling rather than in TensorBoard code directly.
Follow-up ideas
These are not required for this PR, but may be worth considering later:
6.31.1instead of allowing newer6.x/7.x.WORKSPACEcompatibility wiring into more focusedthird_partyhelpers.Final status
bazel query //...: passingupdate_protos_test: passingbazel test //tensorboard/...: passing