-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add makefile target to verify the local module cache #775
Conversation
ecdd476
to
949f7bb
Compare
Are you sure that it will not modify anything if this step passes? If And are you sure there is no more reliable way of checking that it passes other than with a simple grep? These questions aside (the first one being a blocker for me), I'm happy, but suggest waiting on someone else to chime in first before merge |
Here is what their documentation says: "go mod verify may download go.mod files in order to perform minimal version selection. It will use go.sum to verify those files, and it may add go.sum entries for missing hashes." In my testing I haven't seen it modify anything (i.e. go.sum) so far.
I couldn't find a flag or another option that would make it fail, happy to take another approach if there are suggestions. |
😅 okay lol, I guess we can try it out and drop it if this starts being a nuisance. I wont mark this as approved though, and will let others keep chatting on this first (as I'm still very 50-50 on this RE cost-benefit, and I guess this isn't blocking any other work).
Okay no worries :P |
Here's a middle ground idea:
|
949f7bb
to
171c14d
Compare
Codecov Report
@@ Coverage Diff @@
## develop #775 +/- ##
===========================================
- Coverage 59.11% 58.53% -0.58%
===========================================
Files 153 150 -3
Lines 16977 16900 -77
===========================================
- Hits 10036 9893 -143
- Misses 6023 6083 +60
- Partials 918 924 +6
|
Happy with this suggestion. I have removed the build step, and fixed the makefile target to show the failure as suggested. |
171c14d
to
c03bdf3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d4b0e89
to
c03bdf3
Compare
failure and pass if all is well.
c03bdf3
to
baa0e1f
Compare
Thanks, I've added the corresponding step to the release process document so next time we produce a binary we manually do the step... To be automated later. |
The Go 1.18 release notes indicate that |
…rk#775) - Resolves sourcenetwork#762 - Introduces a Makefile target that will fail when `go mod verify` reports any changes to module cache, because by default the `go mod verify` command just prints the modules that were tampered with (doesn't fail or return an error).
Resolves #762
Description
go mod verify
reports any changes to module cache, because by default thego mod verify
command just prints the modules that were tampered with (doesn't fail or return an error).Limitations
No way to specify
go mod verify
to be a read-only op (i.e. in some cases might modifygo.sum
file.How has this been tested?
Ensured that CI will fail upon
Specify the platform(s) on which this was tested: