Skip to content

[9.1.1] Fix: Prevent GitHub 'Latest' badge regression on maintenance releases…#29595

Merged
iancha1992 merged 1 commit into
bazelbuild:release-9.1.1from
iancha1992:cpa49b777c_9.1.1
May 19, 2026
Merged

[9.1.1] Fix: Prevent GitHub 'Latest' badge regression on maintenance releases…#29595
iancha1992 merged 1 commit into
bazelbuild:release-9.1.1from
iancha1992:cpa49b777c_9.1.1

Conversation

@iancha1992
Copy link
Copy Markdown
Member

… (#29452)

Problem:

GitHub automatically marks the most recently created release as "Latest." When a maintenance patch (e.g., 8.7.0) is released after a newer major version (e.g., 9.1.0), the "Latest" badge incorrectly regresses to the older version.

Solution:

Updated scripts/ci/build.sh to perform a semantic version check using sort -V. If the new release is semantically older than an existing one, the script now explicitly calls the GitHub API to set make_latest: false, ensuring the badge stays on the true highest version.

Impact:

PR #2598 (Continuous-integration): Fixes the Docker Registry (bazel:latest tag).
PR #29452 (Bazel): Fixes the GitHub Releases Page (the green "Latest" badge).
PR #2692 (Continuous-integration): Buildkite pipeline for Github CLI migration.

Closes #29452.

PiperOrigin-RevId: 914121481
Change-Id: Ic725b3e49105b3d25c54545740e289a6f13f1aa0

Description

Motivation

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

Commit a49b777

…bazelbuild#29452)

Problem:

  GitHub automatically marks the most recently created release as "Latest." When a maintenance patch (e.g., 8.7.0) is released after a newer major version (e.g., 9.1.0), the "Latest" badge incorrectly regresses to the older version.

  Solution:

  Updated scripts/ci/build.sh to perform a semantic version check using sort -V. If the new release is semantically older than an existing one, the script now explicitly calls the GitHub API to set make_latest: false, ensuring the badge stays on the true highest version.

  Impact:

   - Guarantees the "Latest" badge always points to the highest semantic version.
   - Prevents legacy branch updates from hijacking the project's "Latest" status.
   - Syncs GitHub UI state with the fix introduced in bazelbuild/continuous-integration#2598.

   PR #[2598](bazelbuild/continuous-integration#2598) (Continuous-integration): Fixes the Docker Registry (bazel:latest tag).
   PR bazelbuild#29452 (Bazel): Fixes the GitHub Releases Page (the green "Latest" badge).
   PR #[2692](bazelbuild/continuous-integration#2602) (Continuous-integration): Buildkite pipeline for Github CLI migration.

Closes bazelbuild#29452.

PiperOrigin-RevId: 914121481
Change-Id: Ic725b3e49105b3d25c54545740e289a6f13f1aa0
@iancha1992 iancha1992 requested a review from Wyverald May 19, 2026 17:52
@iancha1992 iancha1992 requested a review from a team as a code owner May 19, 2026 17:52
@iancha1992 iancha1992 added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website awaiting-review PR is awaiting review from an assigned reviewer labels May 19, 2026
@iancha1992 iancha1992 enabled auto-merge May 19, 2026 17:59
@iancha1992 iancha1992 added this to the 9.1.1 release blockers milestone May 19, 2026
@iancha1992 iancha1992 added this pull request to the merge queue May 19, 2026
Merged via the queue into bazelbuild:release-9.1.1 with commit a334ee4 May 19, 2026
46 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants