Skip to content

fix(releasekit): add set_upstream to VCS push and fail fast on errors#4662

Merged
yesudeep merged 1 commit into
mainfrom
yesudeep/fix/mountainous-thread
Feb 13, 2026
Merged

fix(releasekit): add set_upstream to VCS push and fail fast on errors#4662
yesudeep merged 1 commit into
mainfrom
yesudeep/fix/mountainous-thread

Conversation

@yesudeep
Copy link
Copy Markdown
Contributor

Releasekit's prepare command was silently succeeding when git push
or PR creation failed, because the push result was unchecked and the
forge result fell back to an empty string. This made CI runs appear
green when the release branch or PR wasn't actually created.

  • Add set_upstream parameter to the VCS push() protocol, Git, and
    Mercurial backends so new release branches track their remote
  • Check push() and create_pr() results in prepare_release() and
    raise RuntimeError on failure instead of silently continuing
  • Add fetch-tags: true to all actions/checkout steps across the
    three releasekit workflow templates — required for changelog
    since-tag range resolution
  • Update all FakeVCS test doubles to match the new push() signature

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @yesudeep, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the reliability of Releasekit's prepare command by addressing issues where git push or PR creation failures were silently ignored. The changes introduce explicit error checking, ensuring that CI runs accurately reflect the success or failure of release branch creation and PR generation. Additionally, it standardizes tag fetching in CI workflows, which is crucial for correct changelog generation, and updates VCS push logic to properly set upstream branches.

Highlights

  • Robust Error Handling: Introduced robust error handling for VCS push operations and Pull Request creation within Releasekit's prepare command, preventing silent failures and ensuring CI runs accurately reflect outcomes.
  • VCS Push Enhancements: Enhanced the VCS push() protocol and its Git/Mercurial backends with a set_upstream parameter to correctly track new release branches on the remote.
  • Improved Tag Fetching in CI: Configured GitHub Actions actions/checkout steps in Releasekit workflow templates to fetch-tags: true, which is essential for accurate changelog generation based on tag ranges.
  • Test Double Updates: Updated all FakeVCS test doubles to align with the modified push() method signature, maintaining test integrity and compatibility.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • py/tools/releasekit/github/workflows/releasekit-pnpm.yml
    • Added fetch-tags: true to actions/checkout steps.
  • py/tools/releasekit/github/workflows/releasekit-uv.yml
    • Added fetch-tags: true to actions/checkout steps.
  • py/tools/releasekit/src/releasekit/backends/vcs/init.py
    • Added set_upstream parameter to the push method signature.
  • py/tools/releasekit/src/releasekit/backends/vcs/git.py
    • Implemented the set_upstream option for Git push commands.
  • py/tools/releasekit/src/releasekit/backends/vcs/mercurial.py
    • Added set_upstream parameter to the push method signature.
  • py/tools/releasekit/src/releasekit/prepare.py
    • Added error handling for vcs.push() and create_pr() operations.
  • py/tools/releasekit/tests/rk_changelog_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_commitback_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_preflight_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_prepare_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_publisher_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_release_notes_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_release_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_tags_test.py
    • Updated push method signature in FakeVCS.
  • py/tools/releasekit/tests/rk_versioning_test.py
    • Updated push method signature in FakeVCS.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/releasekit-uv.yml
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

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 important correctness fixes to the releasekit process. It ensures that failures during git push and pull request creation are no longer silent, but instead raise a RuntimeError, which will correctly fail CI runs. It also adds the set_upstream parameter to the VCS push operation to correctly set up tracking for new release branches. Additionally, it adds fetch-tags: true to the GitHub Actions workflows to ensure changelog generation works correctly. The changes are well-implemented, and I have one suggestion to improve the consistency of the Mercurial backend implementation.

@yesudeep yesudeep force-pushed the yesudeep/fix/mountainous-thread branch from bcc1914 to c369ab4 Compare February 13, 2026 23:34
Releasekit's prepare command was silently succeeding when `git push`
or PR creation failed, because the push result was unchecked and the
forge result fell back to an empty string. This made CI runs appear
green when the release branch or PR wasn't actually created.

- Add `set_upstream` parameter to the VCS `push()` protocol, Git, and
  Mercurial backends so new release branches track their remote
- Check `push()` and create_pr() results in `prepare_release()` and
  raise `RuntimeError` on failure instead of silently continuing
- Add `fetch-tags: true` to all `actions/checkout` steps across the
  three releasekit workflow templates — required for changelog
  since-tag range resolution
- Update all FakeVCS test doubles to match the new `push()` signature
@yesudeep yesudeep force-pushed the yesudeep/fix/mountainous-thread branch from c369ab4 to 81b75e0 Compare February 13, 2026 23:35
@yesudeep yesudeep enabled auto-merge (squash) February 13, 2026 23:35
@yesudeep yesudeep merged commit e983b22 into main Feb 13, 2026
25 checks passed
@yesudeep yesudeep deleted the yesudeep/fix/mountainous-thread branch February 13, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants