Bazel: Fix prerelease filtering with same-release-line scoping#15332
Bazel: Fix prerelease filtering with same-release-line scoping#15332v-HaripriyaC wants to merge 1 commit into
Conversation
baf5f6f to
903df7e
Compare
107b659 to
a03b77e
Compare
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Bazel ecosystem’s version-selection logic to avoid proposing unrelated prerelease updates when a dependency is currently pinned to a prerelease, while still allowing stable upgrades. It implements “same release line” scoping for prereleases in Bazel::UpdateChecker and adds a comprehensive spec matrix to validate the new behavior.
Changes:
- Add prerelease filtering to Bazel’s update selection so prerelease users only consider prereleases on the same base release line (plus stable releases).
- Reorder filtering so prerelease filtering happens before ignored-version filtering, and add defensive handling for malformed registry versions.
- Add targeted specs for stable vs prerelease current versions, unrelated prereleases, nil current version, logging, and
.bcr.Xstability behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| bazel/lib/dependabot/bazel/update_checker.rb | Adds same-release-line prerelease filtering and adjusts filter ordering / validation in Bazel’s latest-version selection. |
| bazel/spec/dependabot/bazel/update_checker_spec.rb | Adds scenario coverage validating the prerelease scoping, logging behavior, malformed versions, and .bcr.X interactions. |
a03b77e to
918c63e
Compare
f48d10b to
0644a6e
Compare
5fc09e2 to
efe90b3
Compare
efe90b3 to
482ce6c
Compare
|
@v-HaripriyaC , if you can confirm the following feedback then it is ready.
Everything else (the scoping logic, filter ordering, |
|
bazel-prerelease-fix-walkthrough.md |
75d5b34 to
4184737
Compare
done! |
4184737 to
d215a21
Compare
d215a21 to
19428b7
Compare
What are you trying to accomplish?
Fixes the P2 behavioral gap in Bazel's prerelease filtering identified in the versioning audit. Previously, when a user was on a prerelease (e.g., 35.0-rc1), Dependabot would propose updates to any newer prerelease including unrelated ones (e.g., 36.0-alpha.1). This creates noise and potentially harmful update PRs — particularly for the protobuf module on BCR which regularly publishes -rc1/-rc2 prereleases.
The fix adds same-release-line scoping so that:
Anything you want to highlight for special attention from reviewers?
This logic is implemented at the Bazel ecosystem level (not in common/) for the following reasons:
The approach is modeled after Bun/npm's related_to_current_pre? pattern — compares current.release == candidate.release to scope prerelease inclusion to the same base version.
How will you know you've accomplished your goal?
spec scenarios validate the behavior:
Checklist