Skip to content

Bazel cleanup#7114

Open
psamanoelton wants to merge 3 commits into
tensorflow:masterfrom
psamanoelton:bazel_update
Open

Bazel cleanup#7114
psamanoelton wants to merge 3 commits into
tensorflow:masterfrom
psamanoelton:bazel_update

Conversation

@psamanoelton
Copy link
Copy Markdown
Contributor

Summary

This PR does a small round of Bazel 7 cleanup and dependency-wiring simplification on top of the already-working Bazel 7 / protobuf 6 baseline.

The goal is not to change dependency versions or CI behavior, but to reduce migration-specific scaffolding where it is no longer needed, keep the remaining shims clearly documented, and preserve a clean, working build/test state.

What changed

Repository helper cleanup

  • simplified third_party/repo.bzl
  • removed unused tb_http_archive support for build_file / link_files
  • kept tb_http_archive focused on the behaviors still used in this repo:
    • mirrored URLs
    • optional patch application

WORKSPACE cleanup

  • switched mirror-only repositories back to plain http_archive where the TensorBoard-specific helper was no longer adding value
  • kept tb_http_archive(...) only for repositories that still need:
    • patch application
    • repo mapping
  • clarified comments around the remaining Bazel/protobuf compatibility repos

Compatibility shim review

  • verified that third_party/compatibility_proxy is still required by the current rules_java / protobuf loading path
  • kept it in place rather than removing a live dependency
  • verified that third_party/protobuf_pip_deps and third_party/protobuf_pip_deps_setuptools are still required by protobuf 6.31.1’s Bazel macros and Python packaging flow
  • improved documentation explaining why those repos still exist

Why this PR is useful

This PR keeps the Bazel 7 migration easier to maintain by:

  • removing dead helper code
  • narrowing custom repository logic to the cases that still need it
  • documenting the remaining compatibility shims with concrete rationale
  • avoiding behavior changes to the working build graph

Validation

Validated with:

  • bazel fetch //tensorboard/...
  • bazel build //tensorboard/... --nobuild
  • bazel build //tensorboard/...
  • bazel test //tensorboard/plugins/debugger_v2:debugger_v2_plugin_test
  • full local Bazel test runs after the cleanup changes

Comment thread WORKSPACE Outdated
path = "third_party/protobuf_pip_deps",
)

# Protobuf's python/dist BUILD also shells against
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Not sure I understand what the expression "shalls against" mean here. Can it be phrased differently?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased the comment, thanks!

@samanoelton samanoelton marked this pull request as ready for review June 2, 2026 01:09
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.

3 participants