Skip to content

chore(release): automate multi-version backports and support direct patch promotion#3936

Merged
rickeylev merged 3 commits into
bazel-contrib:mainfrom
rickeylev:automate-release-tool-backports
Jul 18, 2026
Merged

chore(release): automate multi-version backports and support direct patch promotion#3936
rickeylev merged 3 commits into
bazel-contrib:mainfrom
rickeylev:automate-release-tool-backports

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Adds automated workflow and tooling support for multi-version backports and support direct patch release promotion.

Previously, backports required manual preparation and tracking across multiple branches, and patch releases were promoted as RCs instead of direct patch releases.

This change:

  • Adds backport_prepare and backport_create_releases scripts and GitHub Action workflows to track and automate cherry-picking PRs across multiple minor release branches.
  • Renames promote_rc to promote to support promoting patch releases directly.
  • Refactors release tools to use BackportMetadata dataclass and propagate errors with context (add_note).
  • Updates RELEASING.md documentation.

Added backport-prepare and backport-create-releases commands to automate
backporting PRs to multiple active release branches. Renamed and refactored
promote-rc to promote to support direct tagging of patch releases on the
branch head, bypassing RC verification.
@rickeylev
rickeylev requested a review from aignas as a code owner July 18, 2026 02:15
@rickeylev rickeylev changed the title feat(release): automate multi-version backports and support direct patch promotion chore(release): automate multi-version backports and support direct patch promotion Jul 18, 2026

@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 automated patch releases to multiple versions by adding the backport-prepare and backport-create-releases subcommands, and refactors the promote-rc command to promote to support direct patch releases from the branch head. Feedback on the implementation highlights Windows compatibility issues in gh.py where tempfile.NamedTemporaryFile is kept open during CLI execution, leading to file locking errors. Additionally, a bug was identified in backport_prepare.py where version comparisons fail if a patch version is specified (e.g., 1.7.0 instead of 1.7), which can be resolved by slicing the version list to compare only the major and minor components.

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/gh.py
Comment thread tools/private/release/gh.py
Comment thread tools/private/release/backport_prepare.py Outdated
@rickeylev
rickeylev merged commit d92af74 into bazel-contrib:main Jul 18, 2026
4 of 6 checks passed
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