-
Notifications
You must be signed in to change notification settings - Fork 58
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: upgrade to setup-go v4 and disable cache with golangci #1005
Conversation
6214658
to
8c2ddce
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.
It works, but I would check if this can be solved in golanci, since the issue is the cache used in golanci, not setup-go.
In any case, when we change the defaults we want to add a comment explaining why the change is needed.
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: false |
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.
We need a comment here why we skip the cache, or maybe we should skip golangci cache instead, since the issue is in golanci?
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.
I agree, but I did not find any workarounds with golangci.
I will raise a new issue in the golangci to highlight this scenario.
Also the golangci issue135 has one partial fix which went in 2.4.1 and we are already in golangci-lint-action@v3.
I had tried by updating the' with version' in golangci/golangci-lint-action:
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
But did not find much luck with it.
I am not sure what version v1.49.0 is actually representing.
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.
.github/workflows/ci.yaml
Outdated
@@ -58,6 +57,7 @@ jobs: | |||
git --no-pager diff | |||
git diff-index --quiet HEAD | |||
|
|||
|
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.
The whitespace changes are unrelated and should be in another commit.
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.
The white space changes do not look consistent to me, not sure if the intent is to separate sections using 2 lines. Can you clarify @Shwetha-Acharya ?
As of now we are disabling cache on setup-go only when we are using golangci.
I was experimenting with many changes to resolve this issue and did not notice that I had added extra spaces. |
Below errors were seen with setup-go@v4 in golangci Lint: Error: /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/[email protected]/yaml_ test.go: Cannot open: File exists /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/[email protected]/LICENSE: Cannot open: File exists Disabling Cache with golangci solves the problem and makes sure that we are in a reecent setup-go as well. Cache can be enabled once the resultant issue is fixed in golangci lint action repo. Issue that is to be tracked: golangci/golangci-lint-action#135 Updates: RamenDR#1000 Signed-off-by: Shwetha K Acharya <[email protected]>
8c2ddce
to
8eb00f0
Compare
Below errors were seen with setup-go@v4 in golangci Lint: Error: /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/[email protected]/yaml_ test.go: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/[email protected]/LICENSE: Cannot open: File exists
Disabling Cache with golangci solves the problem and makes sure that we are in a recent setup-go as well.
Cache can be enabled once the resultant issue is fixed in golangci lint action repo.
Issue that is to be tracked:
golangci/golangci-lint-action#135
Updates: #1000