Skip to content

fix(internal/sidekick/rust_release): require git v2.28.0#2963

Merged
julieqiu merged 1 commit intogoogleapis:mainfrom
julieqiu:gitversio
Nov 20, 2025
Merged

fix(internal/sidekick/rust_release): require git v2.28.0#2963
julieqiu merged 1 commit intogoogleapis:mainfrom
julieqiu:gitversio

Conversation

@julieqiu
Copy link
Copy Markdown
Member

The sidekick CLI uses the -b flag for git init, which was introduced in v2.28. Check that v2.28.x is installed before running tests.

Fixes #2962

@julieqiu julieqiu requested a review from a team November 20, 2025 01:04
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @julieqiu, 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 addresses an issue where the sidekick CLI's test suite might fail on systems with older Git installations. It introduces a pre-check to ensure that Git version 2.28.0 or newer is present, as a specific git init flag (-b) used in the tests was introduced in that version. By adding this validation, tests will now automatically skip if the Git version is insufficient, improving test reliability and developer experience across different environments.

Highlights

  • Git Version Requirement: Introduced a new check to ensure that Git version 2.28.0 or newer is installed before running tests that depend on Git functionality.
  • Test Skipping Logic: Tests will now be gracefully skipped if the installed Git version does not meet the minimum requirement, preventing failures due to incompatible Git commands.
  • Utility Function Addition: Added a requireGitVersion helper function to parse the Git version output and validate it against the required minimum.
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 adds a check to ensure that git version 2.28.0 or later is installed, as it's a requirement for the tests. The implementation is correct, but I've suggested a way to make the version parsing more robust by using regular expressions instead of string splitting. This will make the check less likely to fail on differently formatted git version strings.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.21%. Comparing base (3d1f537) to head (7dd147f).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2963   +/-   ##
=======================================
  Coverage   83.21%   83.21%           
=======================================
  Files         137      137           
  Lines       11045    11045           
=======================================
  Hits         9191     9191           
  Misses       1437     1437           
  Partials      417      417           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@julieqiu julieqiu enabled auto-merge (squash) November 20, 2025 01:22
@julieqiu julieqiu merged commit 265ee47 into googleapis:main Nov 20, 2025
8 of 9 checks passed
ldetmer added a commit that referenced this pull request Nov 20, 2025
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: not available
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-release-container:latest
<details><summary>librarian: 0.7.0</summary>

##
[0.7.0](v0.6.0...v0.7.0)
(2025-11-20)

### Features

* add command execution package with logging (#2968)
([12f4e94](12f4e949))

* add branch support to RepositoryConfig (#2906)
([2cab5d6](2cab5d65))

* add image sha as a config in repositories config (#2954)
([3d1f537](3d1f5375))

* add initial config (#2965)
([502b063](502b063c))

* add fetch package (#2964)
([53de44d](53de44d8))

* parse gapic_metadata for API version release notes (#2815)
([7ee0328](7ee03283))

* onboard 25 repositories to automation for publish-release (#2907)
([87fae04](87fae04a))

* add version command (#2894)
([8f85be0](8f85be09))

* add RequireCommand test helper (#2978)
([a820a71](a820a710))

* add initial command (#2961)
([c959aea](c959aeae))

* add `stage-release` command (#2902)
([ee05006](ee050065))

### Bug Fixes

* require git v2.28.0 (#2963)
([265ee47](265ee47f))

* enums referenced outside the package (#2952)
([7331816](73318169))

</details>
@julieqiu julieqiu deleted the gitversio branch December 31, 2025 00:28
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.

tests: skip tests that require git when running locally

2 participants