GeezerVison is showing github.com — fix: run bazel-diff in cquery mode under bazelci by rickeylev · Pull Request #3839 · bazel-contrib/rules_python
Conversation
rickeylev
commented
Jun 21, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This PR fixes the CI breakage on main where bazel-diff ran in plain query
mode, ignoring target_compatible_with and attempting to run
platform-incompatible tests.
BazelCI has an EXP_USE_CQUERY env variable that uses cquery to identify
targets instead. Try that, which should respect TCW and filter out
targets that would be passed to bazel-diff.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
gemini-code-assist[bot] reacted with eyes emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a custom java wrapper script (.bazelci/bin/java and .bazelci/bin/java.bat) to intercept bazel-diff invocations in CI, enabling the injection of cquery options and upgrading to bazel-diff v25.0.0. It also updates .bazelci/presubmit.yml to download the required jar and configure the environment path across various platforms. The review feedback highlights a critical issue in the wrapper script where executing a separate bazel query and joining all discovered test targets with + can exceed the Windows command-line length limit and introduce unnecessary overhead. The reviewer suggests passing the query expression directly to --cqueryExpression instead.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
ai got pretty creative in figuring out how to call bazel-diff in cquery mode 😆
ignore this for now
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
|
there we go, much more sane
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
since CI is broken and changes to presubmit.yml will cause bazel-diff to be skipped entirely, i'm going to force submit this.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
aignas
Awaiting requested review from aignas
aignas is a code owner
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.