Skip to content

Commit 5e0a803

Browse files
Merge pull request #397 from jacobweinstock/update-go
Update to Go 1.23: ## Description <!--- Please describe what this PR is going to change --> Update to Go 1.23 ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 9ea059f + a7cdb91 commit 5e0a803

File tree

10 files changed

+10
-16
lines changed

10 files changed

+10
-16
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
env:
99
CGO_ENABLED: 0
10-
GO_VERSION: '1.21'
10+
GO_VERSION: '1.23'
1111
REGISTRY: ghcr.io
1212
# github.repository as <account>/<repo>
1313
IMAGE_NAME: ${{ github.repository }}

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
env:
88
REGISTRY: ghcr.io
99
IMAGE_NAME: ${{ github.repository }}
10-
GO_VERSION: '1.21'
10+
GO_VERSION: '1.23'
1111

1212
jobs:
1313
manager-image:

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ linters:
1313
- errorlint
1414
- exhaustive
1515
# - exhaustivestruct
16-
- exportloopref
16+
- copyloopvar
1717
- forbidigo
1818
- forcetypeassert
1919
- funlen

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Build the manager binary
16-
ARG GOVER=1.21
16+
ARG GOVER=1.23
1717
FROM golang:${GOVER} as builder
1818

1919
WORKDIR /workspace

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ GO_INSTALL = ./scripts/go_install.sh
5151
# Binaries.
5252
CONTROLLER_GEN := go run sigs.k8s.io/controller-tools/cmd/[email protected]
5353

54-
GOLANGCI_LINT_VER := v1.59.1
54+
GOLANGCI_LINT_VER := v1.61.0
5555
GOLANGCI_LINT_BIN := golangci-lint
5656
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
5757

@@ -107,7 +107,7 @@ endif
107107
# Build time versioning details.
108108
LDFLAGS := $(shell hack/version.sh)
109109

110-
GOLANG_VERSION := 1.21
110+
GOLANG_VERSION := 1.23
111111

112112
## --------------------------------------
113113
## Help

controller/machine/hardware.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ func byHardwareAffinity(hardware []tinkv1.Hardware, preferred []infrastructurev1
251251
scores := map[client.ObjectKey]int32{}
252252
// compute scores for each item based on the preferred term weights
253253
for _, term := range preferred {
254-
term := term
255-
256254
selector, err := metav1.LabelSelectorAsSelector(&term.HardwareAffinityTerm.LabelSelector)
257255
if err != nil {
258256
return nil, fmt.Errorf("constructing label selector: %w", err)

controller/machine/scope_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ func Test_Machine(t *testing.T) {
8484
}
8585

8686
for name, c := range cases {
87-
name, c := name, c
88-
8987
t.Run(name, func(t *testing.T) {
9088
t.Parallel()
9189
g := NewWithT(t)

controller/machine/template_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ func Test_Cloud_config_template(t *testing.T) {
7676
}
7777

7878
for name, c := range cases {
79-
c := c
80-
8179
t.Run(name, func(t *testing.T) {
8280
t.Parallel()
8381
g := NewWithT(t)

controller/machine/tinkerbellmachine_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ func Test_Machine_reconciliation_with_available_hardware(t *testing.T) {
458458
g.Expect(client.Get(ctx, hardwareNamespacedName, updatedHardware)).To(Succeed())
459459

460460
if diff := cmp.Diff(updatedHardware.Spec.Interfaces[0].Netboot.AllowPXE, ptr.To(true)); diff != "" {
461-
t.Errorf(diff)
461+
t.Error(diff)
462462
}
463463
})
464464
}
@@ -593,7 +593,7 @@ func Test_Machine_reconciliation_workflow_complete(t *testing.T) {
593593
g.Expect(client.Get(ctx, hardwareNamespacedName, updatedHardware)).To(Succeed())
594594

595595
if diff := cmp.Diff(updatedHardware.Spec.Interfaces[0].Netboot.AllowPXE, ptr.To(false)); diff != "" {
596-
t.Errorf(diff)
596+
t.Error(diff)
597597
}
598598
})
599599
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/tinkerbell/cluster-api-provider-tinkerbell
22

3-
go 1.21.0
3+
go 1.23.0
44

5-
toolchain go1.21.2
5+
toolchain go1.23.1
66

77
require (
88
github.com/go-logr/logr v1.4.1

0 commit comments

Comments
 (0)