From be83281f5805678ebfc09b79a2e2fa0fe3d3f83b Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Wed, 12 May 2021 08:45:41 -0400 Subject: [PATCH] Fix build breakage due to https://github.com/golang/go/issues/44129. The issue was that our build pipeline uses 'go get' call to install golint, which changed the go.mod/go.sum files (not good, but I hadn't noticed before). Due to Golang bug #44129, this caused breakage on the dependencies of certain modules we use. The fix was to switch to 'go install golang.org/x/lint/golint@latest'. The addition of '@latest' puts 'go install' in module aware mode, which no longer changes go.mod file in the current directory. This is better, and it also avoids bug #44129. This commit also has a change due to `go mod tidy`. Finally, I had to add a longer timeout for the golangci-lint installation step in the github actions workflow, since that seems to take a bit over a minute now. This step is usually cached on subsequent runs, so we hadn't seen that failure before. --- .github/workflows/ci.yml | 4 +++- go.sum | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a145b96..b75dbcc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ jobs: # below, but it's still much faster in the end than installing # golangci-lint manually in the `Run lint` step. - uses: golangci/golangci-lint-action@v2 + with: + args: --timeout 2m # Setup Go - name: Setup Go @@ -29,7 +31,7 @@ jobs: - name: Install dependencies run: | go version - go get -u golang.org/x/lint/golint + go install golang.org/x/lint/golint@latest sudo apt update sudo apt install -y make diff --git a/go.sum b/go.sum index edae5615..e86e6041 100644 --- a/go.sum +++ b/go.sum @@ -296,7 +296,6 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-sqlite3 v1.14.7 h1:fxWBnXkxfM6sRiuH3bqJ4CfzZojMOLVc0UTsTglEghA= github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=