Skip to content

Commit e3a0bb3

Browse files
Merge pull request #1567 from stuggi/golang_1.24
[golang] bump to golang 1.24
2 parents a2e455b + 69c37f9 commit e3a0bb3

File tree

92 files changed

+1653
-864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1653
-864
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: tools
33
namespace: openstack-k8s-operators
4-
tag: ci-build-root-golang-1.21-sdk-1.31
4+
tag: ci-build-root-golang-1.24-sdk-1.31

.github/workflows/build-openstack-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
1616
with:
1717
operator_name: openstack
18-
go_version: 1.21.x
18+
go_version: 1.24.x
1919
operator_sdk_version: 1.31.0
2020
bundle_dockerfile: ./bundle.Dockerfile
2121
secrets:

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Go
2222
uses: actions/setup-go@v3
2323
with:
24-
go-version: 1.21.x
24+
go-version: 1.24.x
2525
- uses: actions/checkout@v4
2626
with:
2727
# this fetches all branches. Needed because we need gh-pages branch for deploy to work

.github/workflows/force-bump-pr-manual.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ jobs:
99
with:
1010
operator_name: openstack
1111
branch_name: ${{ github.ref_name }}
12+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31
1213
secrets:
1314
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

.github/workflows/force-bump-pr-scheduled.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ jobs:
1010
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-branches.yaml@main
1111
with:
1212
operator_name: openstack
13+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31
1314
secrets:
1415
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

.github/workflows/kustom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: 1.21.x
19+
go-version: 1.24.x
2020
- uses: actions/checkout@v4
2121
with:
2222
# this fetches all branches. Needed because we need gh-pages branch for deploy to work

.golangci.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
version: 2
2+
13
linters:
24
# Enable specific linter
35
# https://golangci-lint.run/usage/linters/#enabled-by-default
46
enable:
57
- errorlint
68
- revive
79
- ginkgolinter
8-
- gofmt
910
- govet
11+
12+
formatters:
13+
enable:
14+
- gofmt
15+
1016
run:
1117
timeout: 5m

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ repos:
7070
entry: bashate --error . --ignore=E006,E040,E011,E020,E012
7171

7272
- repo: https://github.com/golangci/golangci-lint
73-
rev: v1.59.1
73+
rev: v2.4.0
7474
hooks:
7575
- id: golangci-lint-full
7676
args: ["-v"]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24
22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
33
# Build the manager binary
44
FROM $GOLANG_BUILDER AS builder

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0
5656
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/openstack-operator:latest
5757
IMG ?= $(DEFAULT_IMG)
5858
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
59-
ENVTEST_K8S_VERSION = 1.29
59+
ENVTEST_K8S_VERSION = 1.31
6060

6161
CRDDESC_OVERRIDE ?= :maxDescLen=0
6262

@@ -186,9 +186,10 @@ tidy: ## Run go mod tidy on every mod file in the repo
186186
go mod tidy
187187
cd ./apis && go mod tidy
188188

189+
GOLANGCI_LINT_VERSION ?= v2.4.0
189190
.PHONY: golangci-lint
190191
golangci-lint:
191-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1
192+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
192193
$(LOCALBIN)/golangci-lint run --fix
193194

194195
MAX_PROCS := 5
@@ -309,10 +310,10 @@ KUTTL ?= $(LOCALBIN)/kubectl-kuttl
309310

310311
## Tool Versions
311312
KUSTOMIZE_VERSION ?= v5.5.0 #(dprince: bumped to aquire new features like --load-restrictor)
312-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
313+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
313314
CRD_MARKDOWN_VERSION ?= v0.0.3
314315
KUTTL_VERSION ?= 0.17.0
315-
GOTOOLCHAIN_VERSION ?= go1.21.0
316+
GOTOOLCHAIN_VERSION ?= go1.24.0
316317
OC_VERSION ?= 4.16.0
317318

318319
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
@@ -339,7 +340,7 @@ $(CRD_MARKDOWN): $(LOCALBIN)
339340
.PHONY: envtest
340341
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
341342
$(ENVTEST): $(LOCALBIN)
342-
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
343+
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
343344

344345
.PHONY: ginkgo
345346
ginkgo: $(GINKGO) ## Download ginkgo locally if necessary.

0 commit comments

Comments
 (0)