Fix: Prevent Docker 'latest' tag regression on older maintenance releases#2598
Merged
Conversation
meteorcloudy
approved these changes
May 4, 2026
meteorcloudy
approved these changes
May 4, 2026
copybara-service Bot
pushed a commit
to bazelbuild/bazel
that referenced
this pull request
May 12, 2026
…#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 #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 #29452. PiperOrigin-RevId: 914121481 Change-Id: Ic725b3e49105b3d25c54545740e289a6f13f1aa0
secondsun
pushed a commit
to secondsun/bazel
that referenced
this pull request
May 13, 2026
…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
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
May 18, 2026
…releases… (bazelbuild#29541) … (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 <!-- Thank you for contributing to Bazel! Please read the contribution guidelines: https://bazel.build/contribute.html --> ### Description <!-- Please provide a brief summary of the changes in this PR. --> ### Motivation <!-- Why is this change important? Does it fix a specific bug or add a new feature? If this PR fixes an existing issue, please link it here (e.g. "Fixes bazelbuild#1234"). --> ### Build API Changes <!-- Does this PR affect the Build API? (e.g. Starlark API, providers, command-line flags, native rules) If yes, please answer the following: 1. Has this been discussed in a design doc or issue? (Please link it) 2. Is the change backward compatible? 3. If it's a breaking change, what is the migration plan? --> No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes <!-- If this is a new feature, please add 'RELNOTES[NEW]: <description>' here. If this is a breaking change, please add 'RELNOTES[INC]: <reason>' here. If this change should be mentioned in release notes, please add 'RELNOTES: <reason>' here. --> RELNOTES: None Commit bazelbuild@a49b777 Co-authored-by: deepalak56 <deepalakshmib@google.com>
2 tasks
iancha1992
added a commit
to bazel-io/bazel
that referenced
this pull request
May 19, 2026
…releases… (bazelbuild#29595) … (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 <!-- Thank you for contributing to Bazel! Please read the contribution guidelines: https://bazel.build/contribute.html --> ### Description <!-- Please provide a brief summary of the changes in this PR. --> ### Motivation <!-- Why is this change important? Does it fix a specific bug or add a new feature? If this PR fixes an existing issue, please link it here (e.g. "Fixes bazelbuild#1234"). --> ### Build API Changes <!-- Does this PR affect the Build API? (e.g. Starlark API, providers, command-line flags, native rules) If yes, please answer the following: 1. Has this been discussed in a design doc or issue? (Please link it) 2. Is the change backward compatible? 3. If it's a breaking change, what is the migration plan? --> No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes <!-- If this is a new feature, please add 'RELNOTES[NEW]: <description>' here. If this is a breaking change, please add 'RELNOTES[INC]: <reason>' here. If this change should be mentioned in release notes, please add 'RELNOTES: <reason>' here. --> RELNOTES: None Commit bazelbuild@a49b777 Co-authored-by: deepalak56 <deepalakshmib@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem:
The Docker tagging logic was blindly following GitHub's "latest" redirect. When an older maintenance patch (e.g., 8.7.0) was released after a newer major version (e.g., 9.1.0), the Docker latest tag would incorrectly regress to the older version.
Solution:
Introduced a semantic version check using sort -V. The script now compares the current build version against the GitHub "latest" version and only updates the Docker latest tag if the current build is semantically greater than or equal to the version on GitHub.
Impact:
PR #2598 (Continuous-integration): Fixes the Docker Registry (bazel:latest tag).
PR bazelbuild/bazel#29452 (Bazel): Fixes the GitHub Releases Page (the green "Latest" badge).