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
Bump golangci/golangci-lint-action from 4 to 6 #7803
Conversation
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.
Looks good and it is all working. Please merge, thank you :-)
I think this still needs some tweaking. I need to step back a little, into the experimenting done in the recent PR. The behavior depends on existing cache, if exact match on cache key (restore but not save), partial match based on restore key (restore and save), or no match (no restore but save). Current version does not handle all these cases as it should, I think. One issue is that the setup-go built-in caching in the lint job gets the same cache key as the setup-go step of the build job, and then it fails to be saved, and then it will not include the build/module cache from all the GOOS-specific golangci-lint runs.
What I think I must do in this lint job is to disable all built-in caching, in all of setup-go and golangci-lint-action, and add a custom cache step with actions/cache, which caches everything (build, modules, analysis), which would give the result that I want, same as I ended with in the previous PR. |
25a5818
to
a7577ec
Compare
I have a version now, with a separate cache step, which gives the results corresponding to the previous PR. I think is good now, but will do a few more test runs. The main decision when using the cache action is the cache key.
|
a7577ec
to
e752d41
Compare
@ncw Does your approval still apply? 😄 Should I merge it now? PS: Sorry for doing all the extra iterations and pushes since your last comment/approval, once again, leading to noise in your github notifications. Oh, and with this I guess I'm just adding even more... 😟 |
Version 5 removed go cache management, and therefore also options skip-pkg-cache and skip-build-cache, because the cache related to go itself is already handled by actions/setup-go, and now it only caches golangci-lint analysis. Since we run multiple golangci-lint-action steps for different goos, we want to cache package and build cache and golangci-lint results from all of them, and therefore this commit now changes the approach by disabling all built-in caching and introducing a separate cache step to handle it properly.
e752d41
to
212a24a
Compare
Bumped golangci-lint-action further past version 5 directly to 6. |
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.
Yes, let's give this a go 😃
Version 5 removes Go cache management, and therefore also options skip-pkg-cache and skip-build-cache, because the cache related to Go itself is already handled by actions/setup-go. Now it only caches golangci-lint analysis. Our solution in #7776 therefore needed to be changed.
What is the purpose of this change?
Was the change discussed in an issue or in the forum before?
Checklist