Skip to content

Commit 6477d17

Browse files
authored
Merge pull request #895 from andyzhangx/go1.24
chore: use go1.24
2 parents 3e18952 + 4213be6 commit 6477d17

File tree

7 files changed

+17
-22
lines changed

7 files changed

+17
-22
lines changed

.github/workflows/static.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- name: Run linter
1616
uses: golangci/golangci-lint-action@v6
1717
with:
18-
version: v1.60
19-
args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,contextcheck --timeout=30m0s
18+
version: v1.64
19+
args: -E=gofmt,unused,ineffassign,revive,misspell,copyloopvar,asciicheck,bodyclose,contextcheck --timeout=30m0s
2020
verify-helm:
2121
name: Verify Helm
2222
runs-on: ubuntu-latest

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kubernetes-csi/csi-driver-nfs
22

3-
go 1.23.1
3+
go 1.24
44

55
require (
66
github.com/container-storage-interface/spec v1.11.0

pkg/nfs/controllerserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ func getNfsVolFromID(id string) (*nfsVolume, error) {
800800
// try with separator "/"
801801
volRegex := regexp.MustCompile("^([^/]+)/(.*)/([^/]+)$")
802802
tokens := volRegex.FindStringSubmatch(id)
803-
if tokens == nil || len(tokens) < 4 {
803+
if len(tokens) < 4 {
804804
return nil, fmt.Errorf("could not split %s into server, baseDir and subDir with separator(%s)", id, "/")
805805
}
806806
server = tokens[1]

pkg/nfs/controllerserver_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ func TestCreateVolume(t *testing.T) {
218218
}
219219

220220
for _, test := range cases {
221-
test := test //pin
222221
t.Run(test.name, func(t *testing.T) {
223222
// Setup
224223
cs := initTestController(t)
@@ -300,7 +299,6 @@ func TestDeleteVolume(t *testing.T) {
300299
}
301300

302301
for _, test := range cases {
303-
test := test //pin
304302
if runtime.GOOS == "windows" && !test.testOnWindows {
305303
continue
306304
}
@@ -386,7 +384,6 @@ func TestControllerGetCapabilities(t *testing.T) {
386384
}
387385

388386
for _, test := range cases {
389-
test := test //pin
390387
t.Run(test.desc, func(t *testing.T) {
391388
// Setup
392389
cs := initTestController(t)
@@ -526,7 +523,6 @@ func TestNfsVolFromId(t *testing.T) {
526523
}
527524

528525
for _, test := range cases {
529-
test := test //pin
530526
t.Run(test.name, func(t *testing.T) {
531527
resp, err := getNfsVolFromID(test.volumeID)
532528

pkg/nfs/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,21 @@ func NewControllerServer(d *Driver) *ControllerServer {
6767
}
6868
}
6969

70-
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
70+
func NewControllerServiceCapability(c csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
7171
return &csi.ControllerServiceCapability{
7272
Type: &csi.ControllerServiceCapability_Rpc{
7373
Rpc: &csi.ControllerServiceCapability_RPC{
74-
Type: cap,
74+
Type: c,
7575
},
7676
},
7777
}
7878
}
7979

80-
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
80+
func NewNodeServiceCapability(c csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
8181
return &csi.NodeServiceCapability{
8282
Type: &csi.NodeServiceCapability_Rpc{
8383
Rpc: &csi.NodeServiceCapability_RPC{
84-
Type: cap,
84+
Type: c,
8585
},
8686
},
8787
}

pkg/nfs/utils_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ func TestParseEndpoint(t *testing.T) {
6565
}
6666

6767
for _, test := range cases {
68-
test := test //pin
6968
t.Run(test.desc, func(t *testing.T) {
7069
proto, addr, err := ParseEndpoint(test.endpoint)
7170

release-tools/prow.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -pp
8686
# which is disabled with GOFLAGS=-mod=vendor).
8787
configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory"
8888

89-
configvar CSI_PROW_GO_VERSION_BUILD "1.23.6" "Go version for building the component" # depends on component's source code
89+
configvar CSI_PROW_GO_VERSION_BUILD "1.24.0" "Go version for building the component" # depends on component's source code
9090
configvar CSI_PROW_GO_VERSION_E2E "" "override Go version for building the Kubernetes E2E test suite" # normally doesn't need to be set, see install_e2e
9191
configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below
9292
configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below
@@ -144,7 +144,7 @@ kind_version_default () {
144144
latest|master)
145145
echo main;;
146146
*)
147-
echo v0.14.0;;
147+
echo v0.25.0;;
148148
esac
149149
}
150150

@@ -155,13 +155,13 @@ configvar CSI_PROW_KIND_VERSION "$(kind_version_default)" "kind"
155155

156156
# kind images to use. Must match the kind version.
157157
# The release notes of each kind release list the supported images.
158-
configvar CSI_PROW_KIND_IMAGES "kindest/node:v1.24.0@sha256:0866296e693efe1fed79d5e6c7af8df71fc73ae45e3679af05342239cdc5bc8e
159-
kindest/node:v1.23.6@sha256:b1fa224cc6c7ff32455e0b1fd9cbfd3d3bc87ecaa8fcb06961ed1afb3db0f9ae
160-
kindest/node:v1.22.9@sha256:8135260b959dfe320206eb36b3aeda9cffcb262f4b44cda6b33f7bb73f453105
161-
kindest/node:v1.21.12@sha256:f316b33dd88f8196379f38feb80545ef3ed44d9197dca1bfd48bcb1583210207
162-
kindest/node:v1.20.15@sha256:6f2d011dffe182bad80b85f6c00e8ca9d86b5b8922cdf433d53575c4c5212248
163-
kindest/node:v1.19.16@sha256:d9c819e8668de8d5030708e484a9fdff44d95ec4675d136ef0a0a584e587f65c
164-
kindest/node:v1.18.20@sha256:738cdc23ed4be6cc0b7ea277a2ebcc454c8373d7d8fb991a7fcdbd126188e6d7" "kind images"
158+
configvar CSI_PROW_KIND_IMAGES "kindest/node:v1.32.0@sha256:2458b423d635d7b01637cac2d6de7e1c1dca1148a2ba2e90975e214ca849e7cb
159+
kindest/node:v1.31.2@sha256:18fbefc20a7113353c7b75b5c869d7145a6abd6269154825872dc59c1329912e
160+
kindest/node:v1.30.6@sha256:b6d08db72079ba5ae1f4a88a09025c0a904af3b52387643c285442afb05ab994
161+
kindest/node:v1.29.10@sha256:3b2d8c31753e6c8069d4fc4517264cd20e86fd36220671fb7d0a5855103aa84b
162+
kindest/node:v1.28.15@sha256:a7c05c7ae043a0b8c818f5a06188bc2c4098f6cb59ca7d1856df00375d839251
163+
kindest/node:v1.27.16@sha256:2d21a61643eafc439905e18705b8186f3296384750a835ad7a005dceb9546d20
164+
kindest/node:v1.26.15@sha256:c79602a44b4056d7e48dc20f7504350f1e87530fe953428b792def00bc1076dd" "kind images"
165165

166166
# By default, this script tests sidecars with the CSI hostpath driver,
167167
# using the install_csi_driver function. That function depends on

0 commit comments

Comments
 (0)