Skip to content

ci: float the Bazel matrix per LTS series and add a rolling canary - #384

Open
xnox wants to merge 1 commit into
chainguard-dev:mainfrom
xnox:ci-matrix-rolling
Open

ci: float the Bazel matrix per LTS series and add a rolling canary#384
xnox wants to merge 1 commit into
chainguard-dev:mainfrom
xnox:ci-matrix-rolling

Conversation

@xnox

@xnox xnox commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

The matrix pins four Bazel versions, and each was the newest of its series when it was added — 7.6.1 in #108, 8.3.0 in #144, 9.1.0 and 8.6.0 in #298. They have since gone stale: CI tests 9.1.0 and 8.6.0 while 9.2.0 and 8.7.0 are released. Every new Bazel release needs someone to notice and send a bump.

Bazelisk resolves floating identifiers, so the series heads can track releases themselves:

A floating version identifier like 4.x that returns the latest release from the LTS series started by Bazel 4.0.0.

.bcr/presubmit.yml already expresses its matrix this way (bazel: ["7.x", "8.x", "9.x"]), so this makes the two agree.

Verified with bazelisk locally:

9.x      -> bazel 9.2.0
8.x      -> bazel 8.7.0
7.x      -> bazel 7.7.1
rolling  -> bazel 10.0.0-pre.20260811.3

The matrix

Entry Why
rolling Bazel 10 canary — advisory, see below
9.x 8.x 7.x latest release of each LTS series, tracked automatically
9.1.0 what .bazelversion gives contributors locally
8.3.0 7.6.1 oldest release of their series the matrix covers today

The pins stay because the floating entries would otherwise silently drop coverage of older releases. Note that none of them was ever a deliberate minimum — there is no bazel_compatibility in MODULE.bazel — so if you have a stated support floor, these should be set to it and the rest dropped.

rolling cannot block a merge

continue-on-error: ${{ matrix.bazelversion == 'rolling' }}

A cell with continue-on-error counts as a success for anything that needs: the job, so a broken rolling release shows up in the UI without failing test-roundup. It applies to that cell alone, so every supported version still gates as before — a real failure in 9.x fails the roundup exactly as a failure in 9.1.0 does today.

One incidental fix

The docs-test conditions compared version strings relationally:

if: ${{ matrix.bazelversion >= '9.' || matrix.folder != '.' }}

That does not extend to rolling or N.x, and a cell matching neither branch would silently run no tests at all while reporting green. They now match on the series prefix with startsWith, which is well defined for every entry.

(If #382 lands first these two conditions disappear entirely, and this hunk should be dropped in the rebase.)

Test plan

This PR validates itself — the new matrix runs on it. 9.x and the pinned cells gate; rolling is advisory, and whatever it reports here is the first data point on Bazel 10 readiness.

actionlint clean (the pre-existing SC2086 findings in ci.yaml are unchanged).

🤖 Generated with Claude Code

The four pinned versions were each the newest of their series when they
were added (chainguard-dev#108, chainguard-dev#144, chainguard-dev#298) and have since gone stale: the matrix
tests 9.1.0 and 8.6.0 while 9.2.0 and 8.7.0 are out.

Bazelisk resolves N.x to the latest release of that LTS series, so use
9.x, 8.x and 7.x for the heads and let them track releases on their own.
.bcr/presubmit.yml already expresses its matrix this way. Verified with
bazelisk: 9.x -> 9.2.0, 8.x -> 8.7.0, 7.x -> 7.7.1.

Add rolling (currently 10.0.0-pre.20260811.3) so breakage in the next
LTS shows up before it ships. That cell is advisory: continue-on-error
is set for it alone, and a cell with continue-on-error counts as a
success for anything that needs: the job, so a broken rolling release
cannot block a merge while every supported version still gates
test-roundup.

Keep 9.1.0, 8.3.0 and 7.6.1 pinned. 9.1.0 is what .bazelversion gives
contributors locally, and the other two are the oldest releases of their
series the matrix covers, which the floating entries would otherwise
silently drop.

The docs-test conditions compared version strings relationally, which
does not extend to 'rolling' or 'N.x'. Match on the series prefix with
startsWith instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to 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.

1 participant