From 8fccb3993010ef153b08de5d9f52d3089aec28c0 Mon Sep 17 00:00:00 2001 From: Allen Ray Date: Wed, 7 Feb 2024 10:39:12 -0500 Subject: [PATCH] Migrate to go1.22 Signed-off-by: Allen Ray --- .devcontainer/devcontainer.json | 20 +++++++++----------- .go-version | 2 +- api/go.mod | 2 +- client/internal/v2/go.mod | 2 +- client/pkg/go.mod | 2 +- client/v3/go.mod | 2 +- etcdctl/go.mod | 2 +- etcdutl/go.mod | 2 +- go.mod | 6 ++++-- go.sum | 2 ++ pkg/go.mod | 2 +- server/go.mod | 2 +- tests/go.mod | 2 +- tools/mod/go.mod | 2 +- 14 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 57aab46358d6..fc2b85e4a348 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,23 +2,21 @@ // README at: https://github.com/devcontainers/templates/tree/main/src/go { "name": "Go", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm", - + "image": "mcr.microsoft.com/devcontainers/go:1.22-bookworm", // Features to add to the dev container. More info: https://containers.dev/features. "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {}, - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {} + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {} }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [2379, 2380], - + "forwardPorts": [ + 2379, + 2380 + ], // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": "make build" - // Configure tool-specific properties. // "customizations": {}, -} +} \ No newline at end of file diff --git a/.go-version b/.go-version index c262b1f0dfd4..6245beecd39c 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.21.6 +1.22.1 diff --git a/api/go.mod b/api/go.mod index d982b9876ec1..caf7b7e75a28 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/api/v3 -go 1.21 +go 1.22 require ( github.com/coreos/go-semver v0.3.1 diff --git a/client/internal/v2/go.mod b/client/internal/v2/go.mod index b12846b6eecf..8565b2394d3d 100644 --- a/client/internal/v2/go.mod +++ b/client/internal/v2/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/client/v2 -go 1.21 +go 1.22 require ( go.etcd.io/etcd/api/v3 v3.6.0-alpha.0 diff --git a/client/pkg/go.mod b/client/pkg/go.mod index 5d64b39c96a5..b9fa55e63778 100644 --- a/client/pkg/go.mod +++ b/client/pkg/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/client/pkg/v3 -go 1.21 +go 1.22 require ( github.com/coreos/go-systemd/v22 v22.5.0 diff --git a/client/v3/go.mod b/client/v3/go.mod index 99d619e2e34a..4c92c68f271e 100644 --- a/client/v3/go.mod +++ b/client/v3/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/client/v3 -go 1.21 +go 1.22 require ( github.com/coreos/go-semver v0.3.1 diff --git a/etcdctl/go.mod b/etcdctl/go.mod index 98092fe8749e..1703081dd2b4 100644 --- a/etcdctl/go.mod +++ b/etcdctl/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/etcdctl/v3 -go 1.21 +go 1.22 require ( github.com/bgentry/speakeasy v0.1.0 diff --git a/etcdutl/go.mod b/etcdutl/go.mod index 937f72966b7c..85318584e866 100644 --- a/etcdutl/go.mod +++ b/etcdutl/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/etcdutl/v3 -go 1.21 +go 1.22 replace ( go.etcd.io/etcd/api/v3 => ../api diff --git a/go.mod b/go.mod index 7ee1f28d5315..1f082c85398f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module go.etcd.io/etcd/v3 -go 1.21 +go 1.22 + +toolchain go1.22.1 replace ( go.etcd.io/etcd/api/v3 => ./api @@ -35,7 +37,7 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/time v0.5.0 google.golang.org/grpc v1.61.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.33.0 ) require ( diff --git a/go.sum b/go.sum index 09f5455878a8..a1e29e016c72 100644 --- a/go.sum +++ b/go.sum @@ -256,6 +256,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/pkg/go.mod b/pkg/go.mod index 30ef570cda5c..5e0b00130b4b 100644 --- a/pkg/go.mod +++ b/pkg/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/pkg/v3 -go 1.21 +go 1.22 require ( github.com/creack/pty v1.1.18 diff --git a/server/go.mod b/server/go.mod index 3b1aacee06fc..1d1d6babae42 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/server/v3 -go 1.21 +go 1.22 require ( github.com/coreos/go-semver v0.3.1 diff --git a/tests/go.mod b/tests/go.mod index d21f98596c8d..dfc1a800f864 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/tests/v3 -go 1.21 +go 1.22 replace ( go.etcd.io/etcd/api/v3 => ../api diff --git a/tools/mod/go.mod b/tools/mod/go.mod index a5cda40da940..c913296290b0 100644 --- a/tools/mod/go.mod +++ b/tools/mod/go.mod @@ -1,6 +1,6 @@ module go.etcd.io/etcd/tools/v3 -go 1.21 +go 1.22 require ( github.com/alexfalkowski/gocovmerge v1.2.6