Skip to content

fix: pin tools to fixed versions and fix govulncheck errors#2718

Merged
julieqiu merged 3 commits intogoogleapis:mainfrom
julieqiu:e2e2
Oct 30, 2025
Merged

fix: pin tools to fixed versions and fix govulncheck errors#2718
julieqiu merged 3 commits intogoogleapis:mainfrom
julieqiu:e2e2

Conversation

@julieqiu
Copy link
Copy Markdown
Member

@julieqiu julieqiu commented Oct 30, 2025

Tests are currently failing at HEAD.

One reason is because our tests run all tools using @latest in all_test.go. This makes our test suite fragile because any upstream breaking change can cause failures without warning. Instead, pin each tool to a specific version and update them intentionally on a regular cadence. This will ensure more reproducible and predictable test outcomes.

Another reason is because of errors detected by govulncheck, which are fixed by upgrading to go1.25.3.

For #2714

Currently, our tests run all tools using @latest in all_test.go. This
makes our test suite fragile because any upstream breaking change can
cause failures without warning.

We should instead pin each tool to a specific version and update them
intentionally on a regular cadence. This will ensure more reproducible
and predictable test outcomes.
@julieqiu julieqiu requested a review from a team as a code owner October 30, 2025 02:48
@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 the fragility of the test suite by pinning the versions of external tools used in all_test.go. Previously, these tools were fetched at their @latest versions, which could lead to unexpected test failures due to upstream breaking changes. By fixing the versions, the tests become more reproducible and predictable, allowing for intentional updates on a regular cadence.

Highlights

  • Tool Version Pinning: The golangci-lint tool, used in TestGolangCILint, has been updated from using @latest to a fixed version @v2.5.0.
  • Tool Version Pinning: The goimports tool, used in TestGoImports, has been updated from using @latest to a fixed version @v0.38.0.
  • Tool Version Pinning: The govulncheck tool, used in TestGovulncheck, has been updated from using @latest to a fixed version @v1.1.4.
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 correctly identifies the need to pin tool versions for reproducible tests, which is a great improvement. I've found a critical issue with the golangci-lint package path and version, which will likely cause the test to fail. My review includes a specific suggestion to fix it. Additionally, to improve long-term maintainability, I recommend defining all tool package strings as constants in a single block at the top of all_test.go. This will centralize the versions and make them easier to update in the future.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.69%. Comparing base (9689ec2) to head (ff9b26e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2718   +/-   ##
=======================================
  Coverage   86.69%   86.69%           
=======================================
  Files         118      118           
  Lines        9814     9814           
=======================================
  Hits         8508     8508           
  Misses        921      921           
  Partials      385      385           

☔ 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 changed the title all: run tools in all_test.go at fixed versions all: run tools in all_test.go at fixed versions and fix govulncheck errors Oct 30, 2025
@julieqiu julieqiu changed the title all: run tools in all_test.go at fixed versions and fix govulncheck errors all: pin tools to fixed versions and fix govulncheck errors Oct 30, 2025
@julieqiu julieqiu changed the title all: pin tools to fixed versions and fix govulncheck errors fix: pin tools to fixed versions and fix govulncheck errors Oct 30, 2025
@julieqiu julieqiu requested a review from coryan October 30, 2025 03:04
@julieqiu julieqiu enabled auto-merge (squash) October 30, 2025 03:05
@julieqiu julieqiu merged commit eb25308 into googleapis:main Oct 30, 2025
12 checks passed
@julieqiu julieqiu deleted the e2e2 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.

2 participants