Skip to content

ci: enable bazel-diff - #3838

Merged
rickeylev merged 2 commits into
bazel-contrib:mainfrom
rickeylev:enable-bazel-diff-ci
Jun 20, 2026
Merged

ci: enable bazel-diff#3838
rickeylev merged 2 commits into
bazel-contrib:mainfrom
rickeylev:enable-bazel-diff-ci

Conversation

@rickeylev

@rickeylevrickeylev commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Enable bazel-diff to improve CI performance by skipping targets that aren't affected by a PR

We set USE_BAZEL_DIFF=1 in the reusable task configuration to activate bazel-diff target filtering in our CI pipelines.

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

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 configures the environment variable USE_BAZEL_DIFF to be enabled globally within the reusable configuration of the Bazel CI presubmit pipeline. The feedback highlights that running bazel-diff across all platforms and tasks is highly inefficient and may cause compatibility issues on certain runners like Windows. It is recommended to compute the changed targets once in a preliminary step instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread.bazelci/presubmit.yml
@rickeylevrickeylev changed the title Enable bazel-diff in CIci: enable bazel-diffJun 20, 2026
@rickeylev
rickeylev marked this pull request as ready for review June 20, 2026 03:40
@rickeylev
rickeylev requested a review from aignas as a code ownerJune 20, 2026 03:40
@rickeylev
rickeylev enabled auto-merge June 20, 2026 03:41
skip_in_bazel_downstream_pipeline: "Bazel 7 required"
.reusable_config: &reusable_config
environment:
USE_BAZEL_DIFF: "1"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Where is this env var used? Is it baked into .bazelci config outside of the rules_python repo or something?

I was trying to look up what exactly it would end up doing. I know about https://github.com/Tinder/bazel-diff but we don't have it as a bazel_dep.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🎉

@rickeylev
rickeylev added this pull request to the merge queueJun 20, 2026
Merged via the queue into bazel-contrib:main with commit ca86984Jun 20, 2026
5 checks passed
@rickeylev
rickeylev deleted the enable-bazel-diff-ci branch June 20, 2026 04:48
@rickeylev

Copy link
Copy Markdown
CollaboratorAuthor

I think this broke CI. I think that what happened is the first enabling of bazel-diff skips running it entirely. Subsequent runs use it, but it tries to run targets with target_compatible_with set, then fails.

Sign up for freeto 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

@rickeylev@jvolkman@dougthor42