From feece6e17a523e6ca8382f3bfd7459c96e179e5b Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sun, 21 Jun 2026 03:23:06 +0000 Subject: [PATCH] Enable native cquery target expansion in CI to fix bazel-diff We fix the CI breakage on main where bazel-diff target filtering attempted to run platform-incompatible tests. To resolve this cleanly without wrappers or upstream patches: 1. We set EXP_USE_CQUERY=true in the environment of .reusable_config. This natively forces bazelci.py to use 'bazel cquery' instead of 'bazel query' when expanding wildcard targets, which automatically filters out all platform-incompatible tests. 2. We re-apply the visibility fix in tests/uv/lock/pyproject_toml/BUILD.bazel to ensure the cquery analysis phase succeeds without errors. --- .bazelci/presubmit.yml | 1 + tests/uv/lock/pyproject_toml/BUILD.bazel | 1 + 2 files changed, 2 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 2cac5b961e..147f752724 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -27,6 +27,7 @@ buildifier: .reusable_config: &reusable_config environment: USE_BAZEL_DIFF: "1" + EXP_USE_CQUERY: "true" build_targets: - "--" - "..." diff --git a/tests/uv/lock/pyproject_toml/BUILD.bazel b/tests/uv/lock/pyproject_toml/BUILD.bazel index a64fe50d14..d73d206293 100644 --- a/tests/uv/lock/pyproject_toml/BUILD.bazel +++ b/tests/uv/lock/pyproject_toml/BUILD.bazel @@ -27,4 +27,5 @@ diff_test( timeout = "short", file1 = ":requirements", file2 = "requirements.txt", + visibility = ["//tests/uv/lock:__pkg__"], )