Skip to content

Ten Bazel test targets reference sources absent from the OSS export, breaking bazel build //... #671

Description

@Sahil170595

Three BUILD files declare cc_test / py_test rules whose srcs files are not present in this repository. Bazel resolves srcs at analysis time, so any wildcard build or test covering these packages fails with a missing-input-file error before compilation starts.

Target Missing srcs
//tpu_sync/core:raw_transfer_core_test raw_transfer_core_test.cc
//tpu_sync/core:raw_transfer_impl_test raw_transfer_impl_test.cc
//tpu_sync/frameworks/jax:raw_transfer_test_gl raw_transfer_test.py
//tpu_sync/frameworks/jax:raw_transfer_test_gf raw_transfer_test.py
//tpu_sync/frameworks/jax:raw_transfer_perf_gl raw_transfer_perf_test.py
//tpu_sync/frameworks/jax:raw_transfer_perf_gf raw_transfer_perf_test.py
//tpu_sync/frameworks/torch:torch_raw_transfer_test_gl torch_raw_transfer_test.py
//tpu_sync/frameworks/torch:torch_raw_transfer_test_gf torch_raw_transfer_test.py
//tpu_sync/frameworks/torch:torch_raw_transfer_perf_test_gl torch_raw_transfer_perf_test.py
//tpu_sync/frameworks/torch:torch_raw_transfer_perf_test_gf torch_raw_transfer_perf_test.py

Verified on 6613ae3.

The files exist in this repository's history under earlier paths (core/raw_transfer_core_test.cc, tpu_raiden/frameworks/jax/raw_transfer_test.cc, and similar) but were not carried into tpu_sync/, while the rules referencing them were. This looks like an export gap rather than an intentional deletion — the same family as the copy.bara.sky exclude-glob fix in #637.

Scope

This does not affect the documented setup path. Neither build.sh nor run_tests.sh references any of these targets, and none are dependencies of a non-test target, so building the extension modules and running the Python suites both work. What breaks is bazel build //... and bazel test //... — a natural first move for a new contributor, and a blocker for any repository-wide CI job.

Caveat on verification

I identified these by parsing every literal srcs / hdrs / main entry across the 37 BUILD files in the tree (skipping glob() expressions and cross-package labels) and checking each against the working tree — 385 literals checked, these 10 targets flagged. I have not run Bazel against the tree, so the specific failure mode above is inferred from Bazel's analysis-time srcs resolution rather than observed. The missing files themselves are directly verifiable.

Possible resolutions

Either export the test sources alongside their rules, or strip the rules in the Copybara config so the OSS BUILD files stay internally consistent. The latter seems more likely to be what's wanted, but that's a call for someone with visibility into the internal tree — which is why this is an issue rather than a pull request. A BUILD edit here would be reverted by the next export.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions