Skip to content

Commit 3a0909a

Browse files
authored
Merge pull request #695 from furkatgofurov7/bump-go-1-23
🌱 Bump Go version to 1.23.0
2 parents 7e7d5cc + 5c3f4c8 commit 3a0909a

File tree

17 files changed

+39
-37
lines changed

17 files changed

+39
-37
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,21 @@ jobs:
77
name: lint
88
runs-on: ubuntu-latest
99
strategy:
10+
fail-fast: false
1011
matrix:
1112
working-directory:
1213
- ""
1314
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-go@v5
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
16+
- name: Calculate go version
17+
id: vars
18+
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
19+
- name: Set up Go
20+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # tag=v5.1.0
1621
with:
17-
go-version: '1.22'
22+
go-version: ${{ steps.vars.outputs.go_version }}
1823
- name: golangci-lint
19-
uses: golangci/golangci-lint-action@v6
24+
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # tag=v6.1.1
2025
with:
21-
version: v1.57.2
22-
args: --timeout 15m
26+
version: v1.60.2
27+
args: --timeout 15m

.github/workflows/pr-dependabot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
2828
with:
2929
# go-version: ${{ steps.vars.outputs.go_version }} // TODO: we have to use go version consistent with test infra jobs
30-
go-version: '1.22'
30+
go-version: '1.23'
3131
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # tag=v4.2.0
3232
name: Restore go cache
3333
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: '1.22'
25+
go-version: '1.23'
2626
- name: Run GoReleaser
2727
uses: goreleaser/goreleaser-action@v6
2828
with:

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
timeout: 5m
3-
go: "1.22"
3+
go: "1.23"
44
skip-files:
55
- "zz_generated.*\\.go$"
66
allow-parallel-runners: true

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ROOT:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
2323

2424
.DEFAULT_GOAL:=help
2525

26-
GO_VERSION ?= 1.22.11
26+
GO_VERSION ?= 1.23.0
2727
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
2828

2929
# Use GOPROXY environment variable if set
@@ -70,7 +70,7 @@ CONTROLLER_GEN_VER := v0.16.1
7070
CONTROLLER_GEN_BIN := controller-gen
7171
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
7272

73-
GOLANGCI_LINT_VER := v1.57.2
73+
GOLANGCI_LINT_VER := v1.60.2
7474
GOLANGCI_LINT_BIN := golangci-lint
7575
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
7676

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def build_image():
2020
"SECURITY_CONTACTS"
2121
],
2222
build_args = {
23-
"builder_image": "docker.io/library/golang:1.22.11",
23+
"builder_image": "docker.io/library/golang:1.23.0",
2424
}
2525
)
2626

cmd/plugin/cmd/upgrade_plan.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,14 @@ func runUpgradePlan() error {
178178

179179
w := tabwriter.NewWriter(os.Stdout, 10, 4, 3, ' ', 0)
180180

181-
fmt.Fprintln(w, "NAME\tNAMESPACE\tTYPE\tCURRENT VERSION\tNEXT VERSION")
181+
if _, err := fmt.Fprintln(w, "NAME\tNAMESPACE\tTYPE\tCURRENT VERSION\tNEXT VERSION"); err != nil {
182+
return err
183+
}
182184

183185
for _, upgradeItem := range upgradePlan.Providers {
184-
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", upgradeItem.Name, upgradeItem.Namespace, upgradeItem.Type, upgradeItem.CurrentVersion, prettifyTargetVersion(upgradeItem.NextVersion))
186+
if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", upgradeItem.Name, upgradeItem.Namespace, upgradeItem.Type, upgradeItem.CurrentVersion, prettifyTargetVersion(upgradeItem.NextVersion)); err != nil {
187+
return err
188+
}
185189

186190
if upgradeItem.NextVersion != "" {
187191
upgradeAvailable = true

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module sigs.k8s.io/cluster-api-operator
22

3-
go 1.22.0
4-
5-
toolchain go1.22.11
3+
go 1.23.0
64

75
require (
86
github.com/MakeNowJust/heredoc v1.0.0

hack/chart-update/go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module sigs.k8s.io/cluster-api-operator/hack/chart-update
22

3-
go 1.22.0
4-
5-
toolchain go1.22.11
3+
go 1.23.0
64

75
require (
86
github.com/google/go-github/v50 v50.2.0

hack/ensure-go.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ EOF
3131
local go_version
3232
IFS=" " read -ra go_version <<< "$(go version)"
3333
local minimum_go_version
34-
minimum_go_version=go1.22.0
34+
minimum_go_version=go1.23.0
3535
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
3636
cat <<EOF
3737
Detected go version: ${go_version[*]}.

0 commit comments

Comments
 (0)