diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index 7233082da38..3f2334dd4bb 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/check_make_parser.yml b/.github/workflows/check_make_parser.yml index 4f89fe56c9c..805cf2fe494 100644 --- a/.github/workflows/check_make_parser.yml +++ b/.github/workflows/check_make_parser.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/check_make_visitor.yml b/.github/workflows/check_make_visitor.yml index 68d8660ba84..219e1ece2dc 100644 --- a/.github/workflows/check_make_visitor.yml +++ b/.github/workflows/check_make_visitor.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/cluster_endtoend.yml b/.github/workflows/cluster_endtoend.yml index c188cf15f4f..60edd6e3405 100644 --- a/.github/workflows/cluster_endtoend.yml +++ b/.github/workflows/cluster_endtoend.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/cluster_initial_sharding_multi.yml b/.github/workflows/cluster_initial_sharding_multi.yml index e2f5cf03bf5..20b4354bede 100644 --- a/.github/workflows/cluster_initial_sharding_multi.yml +++ b/.github/workflows/cluster_initial_sharding_multi.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 1f8bb410199..85a4d098d5c 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/docker_test_1.yml b/.github/workflows/docker_test_1.yml index f15e3a3f9bd..0c2c621df32 100644 --- a/.github/workflows/docker_test_1.yml +++ b/.github/workflows/docker_test_1.yml @@ -11,7 +11,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/e2e_race.yml b/.github/workflows/e2e_race.yml index 5484bf81372..fb1b2ca2d8a 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/endtoend.yml b/.github/workflows/endtoend.yml index 5e039acfda2..026e8f1f4ef 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/golangci-linter.yml b/.github/workflows/golangci-linter.yml index 0862c6fed3e..2c68ac6bf9b 100644 --- a/.github/workflows/golangci-linter.yml +++ b/.github/workflows/golangci-linter.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.13 + - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 id: go - name: Check out code into the Go module directory diff --git a/.github/workflows/legacy_local_example.yml b/.github/workflows/legacy_local_example.yml index 5780f90ce52..2033da389af 100644 --- a/.github/workflows/legacy_local_example.yml +++ b/.github/workflows/legacy_local_example.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/local_example.yml b/.github/workflows/local_example.yml index 47d3c8c29aa..acddcc357fa 100644 --- a/.github/workflows/local_example.yml +++ b/.github/workflows/local_example.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/region_example.yml b/.github/workflows/region_example.yml index bc74a0b13fb..b31b9af6151 100644 --- a/.github/workflows/region_example.yml +++ b/.github/workflows/region_example.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/sonar_analysis.yml b/.github/workflows/sonar_analysis.yml index 3381d93b223..9cb84dd6ae9 100644 --- a/.github/workflows/sonar_analysis.yml +++ b/.github/workflows/sonar_analysis.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 5929e7f3366..ba58c5af400 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index 09f1d996f5d..7e71449de83 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/build.env b/build.env index c16ec1e2da8..3bc3ab6a4a9 100755 --- a/build.env +++ b/build.env @@ -17,7 +17,7 @@ source ./tools/shell_functions.inc go version >/dev/null 2>&1 || fail "Go is not installed or is not in \$PATH. See https://vitess.io/contributing/build-from-source for install instructions." -goversion_min 1.13 || fail "Go version reported: `go version`. Version 1.13+ required. See https://vitess.io/contributing/build-from-source for install instructions." +goversion_min 1.15 || fail "Go version reported: `go version`. Version 1.15+ required. See https://vitess.io/contributing/build-from-source for install instructions." mkdir -p dist mkdir -p bin diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index 54402e358ef..0fcf363fdc3 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -1,4 +1,4 @@ -FROM golang:1.13-buster +FROM golang:1.15-buster # Install Vitess build dependencies RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ diff --git a/go.mod b/go.mod index 8f820011419..a5a334b8de1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess -go 1.13 +go 1.15 require ( cloud.google.com/go v0.45.1 diff --git a/go/netutil/netutil_test.go b/go/netutil/netutil_test.go index 193237bec56..bd75f3e2ccc 100644 --- a/go/netutil/netutil_test.go +++ b/go/netutil/netutil_test.go @@ -17,6 +17,7 @@ limitations under the License. package netutil import ( + "fmt" "math/rand" "net" "reflect" @@ -56,7 +57,7 @@ func testUniformity(t *testing.T, size int, margin float64) { rand.Seed(1) data := make([]*net.SRV, size) for i := 0; i < size; i++ { - data[i] = &net.SRV{Target: string('a' + i), Weight: 1} + data[i] = &net.SRV{Target: fmt.Sprint('a' + i), Weight: 1} } checkDistribution(t, data, margin) } diff --git a/go/trace/fake.go b/go/trace/fake.go index 26821b96183..53f0a3a7fc9 100644 --- a/go/trace/fake.go +++ b/go/trace/fake.go @@ -25,8 +25,10 @@ import ( type noopTracingServer struct{} -func (noopTracingServer) New(Span, string) Span { return NoopSpan{} } -func (noopTracingServer) NewClientSpan(parent Span, serviceName, label string) Span { return NoopSpan{} } +func (noopTracingServer) New(Span, string) Span { return NoopSpan{} } +func (noopTracingServer) NewClientSpan(parent Span, serviceName, label string) Span { + return NoopSpan{} +} func (noopTracingServer) FromContext(context.Context) (Span, bool) { return nil, false } func (noopTracingServer) NewFromString(parent, label string) (Span, error) { return NoopSpan{}, nil } func (noopTracingServer) NewContext(parent context.Context, _ Span) context.Context { return parent } diff --git a/go/vt/topo/k8stopo/version.go b/go/vt/topo/k8stopo/version.go index 9f8eeb79915..c7e16bfffeb 100644 --- a/go/vt/topo/k8stopo/version.go +++ b/go/vt/topo/k8stopo/version.go @@ -17,6 +17,8 @@ limitations under the License. package k8stopo import ( + "fmt" + "vitess.io/vitess/go/vt/topo" ) @@ -36,5 +38,5 @@ func VersionFromInt(version int64) topo.Version { if version == -1 { return nil } - return KubernetesVersion(version) + return KubernetesVersion(fmt.Sprint(version)) }