From e85ee9f4987bdd9241f4848d360a69ba40dcbefe Mon Sep 17 00:00:00 2001 From: Dave Enyeart Date: Wed, 18 Oct 2023 03:48:50 -0400 Subject: [PATCH] Bump Go to 1.21.3 (release-2.5) (#4478) Bump Go to 1.21.3 (release-2.5). Signed-off-by: David Enyeart --- .github/workflows/release.yml | 2 +- .github/workflows/verify-build.yml | 2 +- Makefile | 2 +- common/fabhttp/server_test.go | 4 +++- core/operations/system_test.go | 4 +++- docs/source/prereqs.md | 4 ++-- orderer/consensus/etcdraft/chain_test.go | 1 + vagrant/golang.sh | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c4babb074c..f719ace3cb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ on: tags: [ v2.* ] env: - GO_VER: 1.20.7 + GO_VER: 1.21.3 UBUNTU_VER: 20.04 FABRIC_VER: ${{ github.ref_name }} DOCKER_REGISTRY: ${{ github.repository_owner == 'hyperledger' && 'docker.io' || 'ghcr.io' }} diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml index 0129671ed1e..959de65c117 100644 --- a/.github/workflows/verify-build.yml +++ b/.github/workflows/verify-build.yml @@ -13,7 +13,7 @@ on: env: GOPATH: /opt/go PATH: /opt/go/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin - GO_VER: 1.20.7 + GO_VER: 1.21.3 jobs: basic-checks: diff --git a/Makefile b/Makefile index cae21fc6853..135273de414 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ METADATA_VAR += CommitSHA=$(EXTRA_VERSION) METADATA_VAR += BaseDockerLabel=$(BASE_DOCKER_LABEL) METADATA_VAR += DockerNamespace=$(DOCKER_NS) -GO_VER = 1.20.7 +GO_VER = 1.21.3 GO_TAGS ?= RELEASE_EXES = orderer $(TOOLS_EXES) diff --git a/common/fabhttp/server_test.go b/common/fabhttp/server_test.go index 37b7574fdc8..b74644c7fd4 100644 --- a/common/fabhttp/server_test.go +++ b/common/fabhttp/server_test.go @@ -12,6 +12,7 @@ import ( "io/ioutil" "net" "net/http" + "net/url" "os" "path/filepath" "syscall" @@ -169,7 +170,8 @@ var _ = Describe("Server", func() { Expect(err).NotTo(HaveOccurred()) _, err = unauthClient.Get(fmt.Sprintf("https://%s/healthz", server.Addr())) - Expect(err).To(MatchError(ContainSubstring("remote error: tls: bad certificate"))) + Expect(err).To(BeAssignableToTypeOf(&url.Error{})) + Expect(err.(*url.Error).Err.Error()).To(ContainSubstring("remote error: tls: certificate required")) }) }) diff --git a/core/operations/system_test.go b/core/operations/system_test.go index dae684c5b59..6f42a12542a 100644 --- a/core/operations/system_test.go +++ b/core/operations/system_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net" "net/http" + "net/url" "os" "path/filepath" "syscall" @@ -199,7 +200,8 @@ var _ = Describe("System", func() { Expect(err).NotTo(HaveOccurred()) _, err = unauthClient.Get(fmt.Sprintf("https://%s/healthz", system.Addr())) - Expect(err).To(MatchError(ContainSubstring("remote error: tls: bad certificate"))) + Expect(err).To(BeAssignableToTypeOf(&url.Error{})) + Expect(err.(*url.Error).Err.Error()).To(ContainSubstring("remote error: tls: certificate required")) }) }) diff --git a/docs/source/prereqs.md b/docs/source/prereqs.md index af15a498aa3..15e12ecbeab 100644 --- a/docs/source/prereqs.md +++ b/docs/source/prereqs.md @@ -82,9 +82,9 @@ Optional: Install the latest Fabric supported version of [Go](https://golang.org installed (only required if you will be writing Go chaincode or SDK applications). ```shell -$ brew install go@1.20.7 +$ brew install go@1.21.3 $ go version -go1.20.7 darwin/amd64 +go1.21.3 darwin/amd64 ``` ### JQ diff --git a/orderer/consensus/etcdraft/chain_test.go b/orderer/consensus/etcdraft/chain_test.go index da86ad0c66e..5a40d553217 100644 --- a/orderer/consensus/etcdraft/chain_test.go +++ b/orderer/consensus/etcdraft/chain_test.go @@ -271,6 +271,7 @@ var _ = Describe("Chain", func() { chain.Halt() By("Create new chain") + opts.MemoryStorage = raft.NewMemoryStorage() _, err := etcdraft.NewChain(support, opts, configurator, nil, cryptoProvider, noOpBlockPuller, nil, observeC) Expect(err).NotTo(HaveOccurred()) }) diff --git a/vagrant/golang.sh b/vagrant/golang.sh index 7f629cae3d4..20c6ac6bffe 100644 --- a/vagrant/golang.sh +++ b/vagrant/golang.sh @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 GOROOT='/opt/go' -GO_VERSION=1.20.7 +GO_VERSION=1.21.3 # ---------------------------------------------------------------- # Install Golang