fix: pin tools to fixed versions and fix govulncheck errors#2718
fix: pin tools to fixed versions and fix govulncheck errors#2718julieqiu merged 3 commits intogoogleapis:mainfrom
Conversation
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.
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Tests are currently failing at HEAD.
One reason is because our tests run all tools using
@latestin 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