Commit e39066b
authored
Update Protobuf Bazel Workspace (#7094)
## Summary
This PR updates TensorBoard’s local Bazel/protobuf build stack to stay
compatible with the TensorFlow 2.21 ecosystem changes that this branch
needs:
- Bazel 6.5.0 -> 7.7.0
- protobuf build/runtime alignment to 6.31.1
- related Bazel repo-loading, packaging, and test fixes needed for local
source builds and CI
The goal of this PR is to keep the smallest working set of changes
needed to make the branch build, test, and package correctly with the
upgraded toolchain.
## What changed
### Bazel / workspace updates
- update `.bazelversion` and Bazel version guards to 7.7.0
- update workspace dependencies and repository wiring needed for Bazel 7
- keep existing repo setup model (`WORKSPACE`) rather than switching
this PR to bzlmod
### Protobuf 6.31.1 alignment
- update the Bazel-side protobuf dependency to 6.31.1
- add the small compatibility shims/patches needed for protobuf’s Bazel
build in this repo
- regenerate/update checked-in generated artifacts where required
### rules_closure / Soy compatibility
- keep TensorBoard’s existing Closure/Soy toolchain working with
protobuf 6
- vendor `third_party/safe_html_types` as a build-time Java dependency
override for the existing Soy toolchain
- explicitly prevent `rules_closure_dependencies(...)` from
re-introducing conflicting older transitive copies
### Packaging and test fixes
- keep `tensorboard.compat` package exports working correctly in Bazel
runfiles and wheel/runtime smoke tests
- keep `test_pip_package` and local Bazel test flows working under the
upgraded toolchain
- reduce PR-specific drift where possible by reverting summary modules
back toward upstream import structure
## Vendored code
This PR vendors `third_party/safe_html_types`, which is the main true
vendored code in this branch.
Why it is needed:
- TensorBoard still uses the Closure/Soy Java toolchain during Bazel
builds
- the older transitive safe-html-types classes pulled by that toolchain
were not working for this protobuf 6.31.1 upgrade path
- this vendored copy is used as a build-time dependency override so the
branch can stay on the upgraded Bazel/protobuf stack
Why this is safe:
- it is build-time Java tooling support, not TensorBoard Python runtime
logic
- it is not intended to change TensorBoard user-facing behavior
- it is scoped to keeping the existing Soy/Closure path working with
protobuf 6
We investigated avoiding vendoring here, but the straightforward
`http_archive` alternatives we tried did not work for this branch’s
current dependency combination.
## Review-driven cleanup in this PR
In response to review, this PR now also:
- adds clearer comments for patches and Bazel helper/shim files
- documents the vendored `safe_html_types` dependency more explicitly
- keeps optional cleanup/refactor work out of scope where possible
- simplifies some summary-module changes back toward upstream shape
## Validation
Validated through the local/container workflow used for this branch,
including:
- Bazel repo loading / fetch
- focused and full Bazel test runs
- pip package build
- `test_pip_package` smoke validation
- TensorBoard import/runtime verification against TensorFlow 2.21
## Follow-up work
The following are better handled in follow-up PRs rather than expanding
this one further:
- CI/setup-python cleanup and container-specific Python setup
simplification
- any future move to bzlmod
- further dependency-management cleanup in `third_party/repo.bzl`
- splitting this large change into smaller independently reviewable PRs
once the full working baseline is settled1 parent 2e19048 commit e39066b
87 files changed
Lines changed: 9121 additions & 125 deletions
File tree
- .github/workflows
- ci
- patches
- tensorboard
- backend/event_processing
- compat
- data/server
- defs
- pip_package
- plugins
- audio
- custom_scalar
- histogram
- hparams
- image
- mesh
- projector
- scalar
- text
- tools
- util
- third_party
- compatibility_proxy
- protobuf_pip_deps_setuptools
- site-packages
- protobuf_pip_deps
- safe_html_types
- META-INF
- com/google/common/html/types
- testing
- assertions
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
2 | 10 | | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
| 81 | + | |
77 | 82 | | |
| 83 | + | |
78 | 84 | | |
79 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
80 | 141 | | |
81 | 142 | | |
82 | 143 | | |
83 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
84 | 160 | | |
85 | 161 | | |
86 | 162 | | |
| |||
98 | 174 | | |
99 | 175 | | |
100 | 176 | | |
101 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
102 | 183 | | |
| 184 | + | |
103 | 185 | | |
104 | 186 | | |
105 | 187 | | |
106 | | - | |
| 188 | + | |
| 189 | + | |
107 | 190 | | |
| 191 | + | |
108 | 192 | | |
109 | 193 | | |
110 | 194 | | |
| |||
0 commit comments