Skip to content
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

fix: Upgrade Go to v1.20. Fixes #11023 #11027

Merged
merged 7 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
cache: true
- run: make test STATIC_FILES=false GOTEST='go test -p 20 -covermode=atomic -coverprofile=coverage.out'
# engineers just ignore this in PRs, so lets not even run it
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
cache: true
- uses: actions/setup-java@v3
if: ${{matrix.test == 'test-java-sdk'}}
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
cache: true
- name: Install protoc
run: |
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
cache: true
- run: make lint STATIC_FILES=false
- run: git diff --exit-code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: 3.9
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.20'
- uses: actions/setup-node@v3
with:
node-version: "19"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ jobs:
node-version: "16"
- uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.20"
- uses: actions/cache@v3
with:
path: ui/node_modules
Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ issues:
exclude:
# We are leaving io/ioutil for now to make backports easier
# https://github.com/argoproj/argo-workflows/pull/6964#issuecomment-946827019
- "SA1019: \"io/ioutil\" has been deprecated since Go 1.16"
- "SA1019: \"io/ioutil\" has been deprecated since Go 1.19"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delaying changes in #10972

- "SA1019: rand.Seed has been deprecated since Go 1.20"
exclude-rules:
- path: server/artifacts/artifact_server_test.go
text: "response body must be closed"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG GIT_COMMIT=unknown
ARG GIT_TAG=unknown
ARG GIT_TREE_STATE=unknown

FROM golang:1.19-alpine3.16 as builder
FROM golang:1.20-alpine3.16 as builder

RUN apk update && apk add --no-cache \
git \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG GIT_TREE_STATE=unknown

# had issues with official golange image for windows so I'm using plain servercore
FROM mcr.microsoft.com/windows/servercore:${IMAGE_OS_VERSION} as builder
ENV GOLANG_VERSION=1.19
ENV GOLANG_VERSION=1.20
SHELL ["powershell", "-Command"]

# install chocolatey package manager
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ dist/manifests/%: manifests/%
# lint/test/etc

$(GOPATH)/bin/golangci-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b `go env GOPATH`/bin v1.49.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b `go env GOPATH`/bin v1.52.2

.PHONY: lint
lint: server/static/files.go $(GOPATH)/bin/golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/argoproj/argo-workflows/v3

go 1.19
go 1.20

require (
cloud.google.com/go/storage v1.30.1
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiclient/http1/facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (h Facade) EventStreamReader(in interface{}, path string) (*bufio.Reader, e
},
},
}
resp, err := client.Do(req)
resp, err := client.Do(req) //nolint
if err != nil {
return nil, err
}
Expand Down