Skip to content

Commit a7077ca

Browse files
authored
Merge pull request #1167 from dongjiang1989/update-golang-v1.24
⚠️Bump to k8s.io/* v0.33.0-alpha.3 and Golang v1.24
2 parents 20191bc + 0b1b8fe commit a7077ca

File tree

7 files changed

+18
-27
lines changed

7 files changed

+18
-27
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
- name: golangci-lint
3434
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # tag=v6.5.0
3535
with:
36-
version: v1.64.5
36+
version: v1.64.6
3737
args: --out-format=colored-line-number
3838
working-directory: ${{matrix.working-directory}}

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run:
44
# Increase the default deadline from 1m as some module operations can take a
55
# while if uncached!
66
timeout: 10m
7-
go: "1.23"
7+
go: "1.24"
88

99
linters:
1010
# sync from https://github.com/kubernetes-sigs/controller-runtime/blob/main/.golangci.yml

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ SHELL:=/usr/bin/env bash
2727
#
2828
# Go.
2929
#
30-
GO_VERSION ?= 1.23.2
30+
GO_VERSION ?= 1.24.0
3131
GOTOOLCHAIN = go$(GO_VERSION)
3232
export GOTOOLCHAIN
3333

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/controller-tools
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/fatih/color v1.18.0
@@ -13,9 +13,9 @@ require (
1313
golang.org/x/tools v0.30.0
1414
gopkg.in/yaml.v2 v2.4.0
1515
gopkg.in/yaml.v3 v3.0.1
16-
k8s.io/api v0.33.0-alpha.2
17-
k8s.io/apiextensions-apiserver v0.33.0-alpha.2
18-
k8s.io/apimachinery v0.33.0-alpha.2
16+
k8s.io/api v0.33.0-alpha.3
17+
k8s.io/apiextensions-apiserver v0.33.0-alpha.3
18+
k8s.io/apimachinery v0.33.0-alpha.3
1919
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
2020
sigs.k8s.io/yaml v1.4.0
2121
)

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
7575
github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY=
7676
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7777
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
78-
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
79-
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
78+
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
79+
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
8080
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
8181
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
8282
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
@@ -90,8 +90,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
9090
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
9191
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
9292
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
93-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
94-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
93+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
94+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
9595
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
9696
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
9797
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -169,12 +169,12 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
169169
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
170170
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
171171
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
172-
k8s.io/api v0.33.0-alpha.2 h1:0EhG38vbUqxIFLdNoyWi7vpoWfIqypz+kYOesOS0seg=
173-
k8s.io/api v0.33.0-alpha.2/go.mod h1:xqTmcffjYs340Ds0pke7EM5Ed8tWU6mRXHdGu78XXps=
174-
k8s.io/apiextensions-apiserver v0.33.0-alpha.2 h1:SGND+C7hAMBvlcJO84JjCAF+Pw8dKG6XzILIEcTeXlw=
175-
k8s.io/apiextensions-apiserver v0.33.0-alpha.2/go.mod h1:0uMjgHbZPH93N+jX0WGZ2dPsBsibc8tMecJaZ9dT69k=
176-
k8s.io/apimachinery v0.33.0-alpha.2 h1:DygfxErwn1BHm5ACt87l3YhlX7rKyRg3QOgrkdNGa7o=
177-
k8s.io/apimachinery v0.33.0-alpha.2/go.mod h1:pvurfgWU15pkR11HFlMI9tdxY59XU+Wzo22Rx2iSD+g=
172+
k8s.io/api v0.33.0-alpha.3 h1:XxGS9bw1WiTOqOR9KdMdDpRZ6lhuBUrmbfXPIVlRPd8=
173+
k8s.io/api v0.33.0-alpha.3/go.mod h1:iOFohHATN/vGrk6ExJm9zwScqN7d473u4smi+9VsGQE=
174+
k8s.io/apiextensions-apiserver v0.33.0-alpha.3 h1:LrHZWMAKyaqsyfLFS+AEbjgqvJOdCOPK/OEpLCe5zfQ=
175+
k8s.io/apiextensions-apiserver v0.33.0-alpha.3/go.mod h1:ET4zkQQQ0jJSAgalYz1NHUjIXFndYInDh35N4Lk5aBk=
176+
k8s.io/apimachinery v0.33.0-alpha.3 h1:ugia3DzNbmhUP4mMUBhelThVifqQvB6YqrXz9Ncoans=
177+
k8s.io/apimachinery v0.33.0-alpha.3/go.mod h1:0rVRgdlgja0MQ+SYCognm5pRNteQOvhHAsDpKOs48GU=
178178
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
179179
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
180180
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=

pkg/crd/gen_integration_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ var _ = Describe("CRD Generation proper defaulting", func() {
9393
By("loading the desired YAML")
9494
expectedFile, err := os.ReadFile(filepath.Join(genDir, "bar.example.com_foos.yaml"))
9595
Expect(err).NotTo(HaveOccurred())
96-
expectedFile = fixAnnotations(expectedFile)
9796

9897
By("comparing the two")
9998
Expect(out.buf.String()).To(Equal(string(expectedFile)), cmp.Diff(out.buf.String(), string(expectedFile)))
@@ -109,10 +108,8 @@ var _ = Describe("CRD Generation proper defaulting", func() {
109108
By("loading the desired YAMLs")
110109
expectedFileFoos, err := os.ReadFile(filepath.Join(genDir, "bar.example.com_foos.yaml"))
111110
Expect(err).NotTo(HaveOccurred())
112-
expectedFileFoos = fixAnnotations(expectedFileFoos)
113111
expectedFileZoos, err := os.ReadFile(filepath.Join(genDir, "zoo", "bar.example.com_zoos.yaml"))
114112
Expect(err).NotTo(HaveOccurred())
115-
expectedFileZoos = fixAnnotations(expectedFileZoos)
116113

117114
By("comparing the two, output must be deterministic because groupKinds are sorted")
118115
expectedOut := string(expectedFileFoos) + string(expectedFileZoos)
@@ -168,18 +165,12 @@ var _ = Describe("CRD Generation proper defaulting", func() {
168165
By("loading the desired YAML")
169166
expectedFile, err := os.ReadFile(filepath.Join(genDir, "bar.example.com_foos_maxdesclen.yaml"))
170167
Expect(err).NotTo(HaveOccurred())
171-
expectedFile = fixAnnotations(expectedFile)
172168

173169
By("comparing the two")
174170
Expect(out.buf.String()).To(Equal(string(expectedFile)), cmp.Diff(out.buf.String(), string(expectedFile)))
175171
})
176172
})
177173

178-
// fixAnnotations fixes the attribution annotation for tests.
179-
func fixAnnotations(crdBytes []byte) []byte {
180-
return bytes.Replace(crdBytes, []byte("(devel)"), []byte("(unknown)"), 1)
181-
}
182-
183174
type outputRule struct {
184175
buf *bytes.Buffer
185176
}

pkg/version/version_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var _ = Describe("TestVersion", func() {
3030
{
3131
name: "empty returns unknown",
3232
version: "",
33-
expected: "(unknown)",
33+
expected: "(devel)",
3434
},
3535
{
3636
name: "set to a value returns it",

0 commit comments

Comments
 (0)