Skip to content

Commit

Permalink
chore: update Go to 1.21
Browse files Browse the repository at this point in the history
This fixes a problem in the `RouteSpecController` which is due to a
subtle (but correct) change in the behavior in the `stdlib`.

Also some small (but should be safe) bumps.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Aug 23, 2023
1 parent a28d72e commit 74c07ed
Show file tree
Hide file tree
Showing 12 changed files with 200 additions and 115 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ FROM ghcr.io/siderolabs/talosctl-cni-bundle-install:${EXTRAS} AS extras-talosctl
FROM --platform=${BUILDPLATFORM} $TOOLS AS tools
ENV PATH /toolchain/bin:/toolchain/go/bin
ENV LD_LIBRARY_PATH /toolchain/lib
ENV GOTOOLCHAIN local
ENV GOEXPERIMENT loopvar
RUN ["/toolchain/bin/mkdir", "/bin", "/tmp"]
RUN ["/toolchain/bin/ln", "-svf", "/toolchain/bin/bash", "/bin/sh"]
RUN ["/toolchain/bin/ln", "-svf", "/toolchain/etc/ssl", "/etc/ssl"]
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ NAME = Talos
CLOUD_IMAGES_EXTRA_ARGS ?= ""

ARTIFACTS := _out
TOOLS ?= ghcr.io/siderolabs/tools:v1.5.0
TOOLS ?= ghcr.io/siderolabs/tools:v1.6.0-alpha.0
PKGS ?= v1.6.0-alpha.0-7-g2e1c0b9
EXTRAS ?= v1.5.0
# renovate: datasource=github-tags depName=golang/go
GO_VERSION ?= 1.20
GO_VERSION ?= 1.21
# renovate: datasource=go depName=golang.org/x/tools
GOIMPORTS_VERSION ?= v0.11.0
GOIMPORTS_VERSION ?= v0.12.0
# renovate: datasource=go depName=mvdan.cc/gofumpt
GOFUMPT_VERSION ?= v0.5.0
# renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCILINT_VERSION ?= v1.53.3
GOLANGCILINT_VERSION ?= v1.54.2
# renovate: datasource=go depName=golang.org/x/tools
STRINGER_VERSION ?= v0.11.0
STRINGER_VERSION ?= v0.12.0
# renovate: datasource=go depName=github.com/alvaroloes/enumer
ENUMER_VERSION ?= v1.1.2
# renovate: datasource=go depName=k8s.io/code-generator
Expand Down Expand Up @@ -58,7 +58,7 @@ KUBECTL_VERSION ?= v1.28.0
# renovate: datasource=github-releases depName=kastenhq/kubestr
KUBESTR_VERSION ?= v0.4.41
# renovate: datasource=github-releases depName=helm/helm
HELM_VERSION ?= v3.12.2
HELM_VERSION ?= v3.12.3
# renovate: datasource=github-releases depName=kubernetes-sigs/cluster-api
CLUSTERCTL_VERSION ?= 1.5.0
# renovate: datasource=github-releases depName=cilium/cilium-cli
Expand Down Expand Up @@ -359,7 +359,7 @@ api-descriptors: ## Generates API descriptors used to detect breaking API change
@$(MAKE) local-api-descriptors DEST=./ PLATFORM=linux/amd64

fmt-go: ## Formats the source code.
@docker run --rm -it -v $(PWD):/src -w /src golang:$(GO_VERSION) bash -c "go install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION) && goimports -w -local github.com/siderolabs/talos . && go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION) && gofumpt -w ."
@docker run --rm -it -v $(PWD):/src -w /src -e GOTOOLCHAIN=local golang:$(GO_VERSION) bash -c "go install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION) && goimports -w -local github.com/siderolabs/talos . && go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION) && gofumpt -w ."

fmt-protobuf: ## Formats protobuf files.
@$(MAKE) local-fmt-protobuf DEST=./ PLATFORM=linux/amd64
Expand Down
64 changes: 33 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/talos

go 1.20
go 1.21

replace (
// Use nested module.
Expand All @@ -26,9 +26,9 @@ require (
require (
cloud.google.com/go/compute/metadata v0.2.3
github.com/BurntSushi/toml v1.3.2
github.com/aws/aws-sdk-go-v2/config v1.18.32
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.7
github.com/aws/smithy-go v1.14.0
github.com/aws/aws-sdk-go-v2/config v1.18.36
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11
github.com/aws/smithy-go v1.14.2
github.com/beevik/ntp v1.3.0
github.com/benbjohnson/clock v1.3.5 // project archived on 2023-05-18
github.com/cenkalti/backoff/v4 v4.2.1
Expand All @@ -46,7 +46,7 @@ require (
github.com/ecks/uefi v0.0.0-20221116212947-caef65d070eb
github.com/emicklei/dot v1.6.0
github.com/fatih/color v1.15.0
github.com/foxboron/go-uefi v0.0.0-20230701115042-32187aa193d0
github.com/foxboron/go-uefi v0.0.0-20230808201820-18b9ba9cd4c3
github.com/freddierice/go-losetup/v2 v2.0.1
github.com/fsnotify/fsnotify v1.6.0
github.com/gdamore/tcell/v2 v2.6.0
Expand All @@ -55,19 +55,19 @@ require (
github.com/godbus/dbus/v5 v5.1.0
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.9
github.com/google/go-containerregistry v0.15.2
github.com/google/go-containerregistry v0.16.1
github.com/google/go-tpm v0.9.0
github.com/google/nftables v0.1.0
github.com/google/uuid v1.3.0
github.com/google/uuid v1.3.1
github.com/gopacket/gopacket v1.1.1
github.com/gosuri/uiprogress v0.0.1
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-getter/v2 v2.2.1
github.com/hashicorp/go-multierror v1.1.1
github.com/hetznercloud/hcloud-go/v2 v2.0.0
github.com/insomniacslk/dhcp v0.0.0-20230731140434-0f9eb93a696c
github.com/jsimonetti/rtnetlink v1.3.4
github.com/hetznercloud/hcloud-go/v2 v2.1.1
github.com/insomniacslk/dhcp v0.0.0-20230816195147-b3ca2534940d
github.com/jsimonetti/rtnetlink v1.3.5
github.com/jxskiss/base62 v1.1.0
github.com/martinlindhe/base36 v1.1.1
github.com/mattn/go-isatty v0.0.19
Expand All @@ -85,7 +85,7 @@ require (
github.com/pin/tftp v2.1.0+incompatible
github.com/pmorjan/kmod v1.1.0
github.com/prometheus/procfs v0.11.1
github.com/rivo/tview v0.0.0-20230621164836-6cc0565babaf
github.com/rivo/tview v0.0.0-20230814110005-ccc2c8119703
github.com/rs/xid v1.5.0
github.com/ryanuber/columnize v2.1.2+incompatible
github.com/ryanuber/go-glob v1.0.0
Expand Down Expand Up @@ -129,11 +129,11 @@ require (
go.etcd.io/etcd/etcdutl/v3 v3.5.9
go.uber.org/zap v1.25.0
go4.org/netipx v0.0.0-20230728184502-ec4c8b891b28
golang.org/x/net v0.13.0
golang.org/x/net v0.14.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.10.0
golang.org/x/term v0.10.0
golang.org/x/text v0.11.0
golang.org/x/sys v0.11.0
golang.org/x/term v0.11.0
golang.org/x/text v0.12.0
golang.org/x/time v0.3.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
google.golang.org/grpc v1.57.0
Expand All @@ -145,7 +145,7 @@ require (
)

require (
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
github.com/0x5a17ed/itkit v0.6.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
Expand All @@ -156,22 +156,22 @@ require (
github.com/ProtonMail/gopenpgp/v2 v2.7.2 // indirect
github.com/adrg/xdg v0.4.0 // indirect
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect
github.com/aws/aws-sdk-go-v2 v1.20.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.31 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.31 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.38 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.31 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.13.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.21.1 // indirect
github.com/aws/aws-sdk-go-v2 v1.21.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.35 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.13.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/blang/semver/v4 v4.0.0
github.com/briandowns/spinner v1.19.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cilium/ebpf v0.10.0 // indirect
github.com/cilium/ebpf v0.11.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/containerd/fifo v1.0.0 // indirect
Expand All @@ -183,7 +183,7 @@ require (
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v23.0.5+incompatible // indirect
github.com/docker/cli v24.0.0+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-units v0.5.0 // indirect
Expand Down Expand Up @@ -270,7 +270,7 @@ require (
github.com/siderolabs/go-api-signature v0.2.6 // indirect
github.com/siderolabs/protoenc v0.2.0 // indirect
github.com/siderolabs/tcpproxy v0.1.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sirupsen/logrus v1.9.1 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -292,16 +292,16 @@ require (
go.opentelemetry.io/otel/trace v1.10.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/tools v0.11.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand All @@ -315,3 +315,5 @@ require (
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

require golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect
Loading

0 comments on commit 74c07ed

Please sign in to comment.