Skip to content

chore(release): various fixes to release tool and workflows#3880

Merged
rickeylev merged 6 commits into
bazel-contrib:mainfrom
rickeylev:fix-create-rc-tag-source
Jul 1, 2026
Merged

chore(release): various fixes to release tool and workflows#3880
rickeylev merged 6 commits into
bazel-contrib:mainfrom
rickeylev:fix-create-rc-tag-source

Conversation

@rickeylev

@rickeylev rickeylev commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

The release tool previously calculated incorrect RC versions or failed when local tags were out of sync with the remote repository.

To resolve this:

  • Query remote tags directly via git ls-remote to determine the next RC version.
  • Fetch upstream tags before determining the next version in promote-rc to avoid stale local state.
  • Remove local checkout and the "already tagged" check in create-rc to simplify the tagging process.
  • Exclude release tool directories from the workflow version marker check.

This fixes a bug where local out-of-sync tags could lead to computing
the wrong next RC version. We now query remote tags directly using
git ls-remote.

Also added type annotations and docstring to get_remote_tags.
@rickeylev rickeylev requested a review from aignas as a code owner July 1, 2026 03:17

@gemini-code-assist gemini-code-assist Bot 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 introduces the ability to query git tags directly from a remote repository using git ls-remote to ensure release candidate versions are determined from the latest remote state. The feedback suggests adding a safety check in get_remote_tags to prevent an AttributeError if run_cmd returns None or an empty string, and refactoring cmd_promote_rc to fetch remote tags before calling determine_next_version to avoid relying on stale local tags.

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 tools/private/release/git.py
Comment thread tools/private/release/release.py
@rickeylev rickeylev changed the title fix(release): use remote tags to determine next RC tag chore(release): use remote tags to determine next RC tag Jul 1, 2026
@rickeylev rickeylev changed the title chore(release): use remote tags to determine next RC tag fix(release): resolve out-of-sync tag issues in release tool Jul 1, 2026
@rickeylev rickeylev changed the title fix(release): resolve out-of-sync tag issues in release tool chore(release): various fixes to release tool and workflows Jul 1, 2026
@rickeylev rickeylev merged commit dc0d977 into bazel-contrib:main Jul 1, 2026
10 of 12 checks passed
@rickeylev rickeylev deleted the fix-create-rc-tag-source branch July 1, 2026 06:14
rickeylev added a commit that referenced this pull request Jul 1, 2026
Excludes the "release" directory from the version checks
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