From 1d3bc1dc6334ce6b09546d9ddfadc5765820a5e2 Mon Sep 17 00:00:00 2001 From: Saarthak Maini <94912101+SaarthakMaini@users.noreply.github.com> Date: Sat, 4 Mar 2023 08:46:10 +0530 Subject: [PATCH] Update Go version to 1.20 (#4206) ## Which problem is this PR solving? - Resolves #4202 ## Short description of the changes All the files mentioned in issue #4202 have been updated with Go version 1.20 replacing version 1.19 Signed-off-by: Saarthak Maini --------- Signed-off-by: Saarthak Co-authored-by: Yuri Shkuro --- .github/workflows/ci-all-in-one-build.yml | 2 +- .github/workflows/ci-build-binaries.yml | 2 +- .github/workflows/ci-cassandra.yml | 2 +- .github/workflows/ci-crossdock.yml | 2 +- .github/workflows/ci-docker-build.yml | 2 +- .github/workflows/ci-elasticsearch.yml | 2 +- .github/workflows/ci-grpc-badger.yml | 2 +- .github/workflows/ci-hotrod.yml | 2 +- .github/workflows/ci-kafka.yml | 2 +- .github/workflows/ci-opensearch.yml | 2 +- .github/workflows/ci-protogen-tests.yml | 2 +- .github/workflows/ci-release.yml | 2 +- .github/workflows/ci-unit-tests.yml | 2 +- .github/workflows/fossa.yml | 2 +- .golangci.yml | 4 ++-- Makefile | 2 +- cmd/anonymizer/app/query/query.go | 4 +--- docker/Makefile | 2 +- go.mod | 2 +- 19 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-all-in-one-build.yml b/.github/workflows/ci-all-in-one-build.yml index 6477b0cd624..4dbe4434dd3 100644 --- a/.github/workflows/ci-all-in-one-build.yml +++ b/.github/workflows/ci-all-in-one-build.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Setup Node.js version uses: ./.github/actions/setup-node.js diff --git a/.github/workflows/ci-build-binaries.yml b/.github/workflows/ci-build-binaries.yml index 15f20c3f4dc..4e130a0f217 100644 --- a/.github/workflows/ci-build-binaries.yml +++ b/.github/workflows/ci-build-binaries.yml @@ -48,7 +48,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Setup Node.js version uses: ./.github/actions/setup-node.js diff --git a/.github/workflows/ci-cassandra.yml b/.github/workflows/ci-cassandra.yml index 6e8248a3f77..e2d2b60874e 100644 --- a/.github/workflows/ci-cassandra.yml +++ b/.github/workflows/ci-cassandra.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Run cassandra integration tests run: bash scripts/cassandra-integration-test.sh ${{ matrix.version.image }} ${{ matrix.version.schema }} diff --git a/.github/workflows/ci-crossdock.yml b/.github/workflows/ci-crossdock.yml index d9fe8495c9d..950a27819ed 100644 --- a/.github/workflows/ci-crossdock.yml +++ b/.github/workflows/ci-crossdock.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Export BRANCH variable uses: ./.github/actions/setup-branch diff --git a/.github/workflows/ci-docker-build.yml b/.github/workflows/ci-docker-build.yml index a4b30d004c7..8c8a348c461 100644 --- a/.github/workflows/ci-docker-build.yml +++ b/.github/workflows/ci-docker-build.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Setup Node.js version uses: ./.github/actions/setup-node.js diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-elasticsearch.yml index 3d5c9f9963e..59efbf6650e 100644 --- a/.github/workflows/ci-elasticsearch.yml +++ b/.github/workflows/ci-elasticsearch.yml @@ -43,7 +43,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Install tools run: make install-ci diff --git a/.github/workflows/ci-grpc-badger.yml b/.github/workflows/ci-grpc-badger.yml index 9f972e82677..ce125051736 100644 --- a/.github/workflows/ci-grpc-badger.yml +++ b/.github/workflows/ci-grpc-badger.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Run Badger storage integration tests run: make badger-storage-integration-test diff --git a/.github/workflows/ci-hotrod.yml b/.github/workflows/ci-hotrod.yml index 5c8e3ec2728..f4f899231d8 100644 --- a/.github/workflows/ci-hotrod.yml +++ b/.github/workflows/ci-hotrod.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Export BRANCH variable uses: ./.github/actions/setup-branch diff --git a/.github/workflows/ci-kafka.yml b/.github/workflows/ci-kafka.yml index 2031cd5f43c..e2c966bd194 100644 --- a/.github/workflows/ci-kafka.yml +++ b/.github/workflows/ci-kafka.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Run kafka integration tests run: bash scripts/kafka-integration-test.sh diff --git a/.github/workflows/ci-opensearch.yml b/.github/workflows/ci-opensearch.yml index e213407d66f..45c6f3ad1e6 100644 --- a/.github/workflows/ci-opensearch.yml +++ b/.github/workflows/ci-opensearch.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Install tools run: make install-ci diff --git a/.github/workflows/ci-protogen-tests.yml b/.github/workflows/ci-protogen-tests.yml index 105008980ba..fa801abe33d 100644 --- a/.github/workflows/ci-protogen-tests.yml +++ b/.github/workflows/ci-protogen-tests.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Run protogen validation run: make proto && git diff --name-status --exit-code diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index f3c681196a1..63cc653b08a 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c with: diff --git a/.github/workflows/ci-unit-tests.yml b/.github/workflows/ci-unit-tests.yml index d02a9699419..60448f57d89 100644 --- a/.github/workflows/ci-unit-tests.yml +++ b/.github/workflows/ci-unit-tests.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Install tools run: make install-ci diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index d84779bcd16..70c70583fe9 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: 1.19.x + go-version: 1.20.x - name: Add GOPATH run: | diff --git a/.golangci.yml b/.golangci.yml index 64c96a7ef39..9d5ec08315d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ run: - go: '1.19' + go: '1.20' timeout: 10m skip-dirs: - mocks @@ -27,7 +27,7 @@ linters-settings: - G404 - G601 gosimple: - go: "1.19" + go: "1.20" linters: enable: diff --git a/Makefile b/Makefile index 60df617a693..9b0184166be 100644 --- a/Makefile +++ b/Makefile @@ -393,7 +393,7 @@ draft-release: .PHONY: install-tools install-tools: go install github.com/vektra/mockery/v2@v2.14.0 - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1 + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.0 go install mvdan.cc/gofumpt@latest .PHONY: install-ci diff --git a/cmd/anonymizer/app/query/query.go b/cmd/anonymizer/app/query/query.go index 88c9510843a..3218c9e4a26 100644 --- a/cmd/anonymizer/app/query/query.go +++ b/cmd/anonymizer/app/query/query.go @@ -80,9 +80,7 @@ func (q *Query) QueryTrace(traceID string) ([]model.Span, error) { if err != nil { return nil, unwrapNotFoundErr(err) } - for i := range received.Spans { - spans = append(spans, received.Spans[i]) - } + spans = append(spans, received.Spans...) } return spans, nil diff --git a/docker/Makefile b/docker/Makefile index 33ee9cd62a0..88d481ebdf9 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,7 +1,7 @@ VERSION := 1.0.0 ROOT_IMAGE ?= alpine:3.16 CERT_IMAGE := $(ROOT_IMAGE) -GOLANG_IMAGE := golang:1.19-alpine +GOLANG_IMAGE := golang:1.20-alpine DOCKER_REGISTRY ?= localhost:5000 BASE_IMAGE ?= $(DOCKER_REGISTRY)/baseimg_alpine:latest diff --git a/go.mod b/go.mod index d80b544633c..f2b537a40e4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/jaegertracing/jaeger -go 1.19 +go 1.20 require ( github.com/HdrHistogram/hdrhistogram-go v1.1.2