Repository navigation
chore: pin mockgen and govulncheck as go tools - #491
Merged
Merged
Conversation
CI generated mocks with mockgen v0.4.0 while go.mod pins the gomock library at v0.6.0, so any machine with a newer mockgen rewrote every mock on `flow generate`. The install step only ran when a tool was missing, so a version already on the shared GOBIN was never corrected, and govulncheck was unpinned. mockgen and govulncheck are now tool directives in go.mod and run with `go tool`, so the generator always matches the library, local and CI runs use the same versions, and dependabot bumps them. Mocks are regenerated at v0.6.0. `install tools` reinstalls cobra-cli and goreleaser whenever the installed version differs from the pin, and no longer installs the unused ginkgo CLI.
Member
Author
|
Verification
Worth a close look
Out of scope (follow-up)
|
# Conflicts: # go.mod # go.sum
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CI generated mocks with mockgen v0.4.0 while
go.modpins the gomock library at v0.6.0, so any machine with a newer mockgen rewrote every mock onflow generate.install toolsonly installed a tool when it was missing, so a version already on the sharedGOBIN(from another repo) was never corrected, and govulncheck ran at@latest.mockgen and govulncheck are now
tooldirectives ingo.mod, run withgo tool. The generator always matches the gomock library, local and CI runs use the same versions, and dependabot bumps them with the rest ofgo.mod.Notable Changes
go:generatedirectives callgo tool mockgen; CI no longer installs mockgen separately. Mocks are regenerated at v0.6.0.scan securityrunsgo tool govulncheck.install toolsreinstalls cobra-cli and goreleaser whenever the installed version differs from the pin, and no longer installs the unused ginkgo CLI. These stay out ofgo.modbecause their dependency trees would leak into the module graph ofpkg/consumers.docs/development.mdlists where each tool's version lives.No ticket