Skip to content

Commit 9813b98

Browse files
Merge pull request #329 from stuggi/golang_1.24
[golang] bump to golang 1.24
2 parents 574547d + fcbcde5 commit 9813b98

32 files changed

+942
-494
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/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: test
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: test
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 }}

.golangci.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
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+
- gosec
12+
- errname
13+
- err113
14+
15+
formatters:
16+
enable:
17+
- gofmt
18+
1019
run:
1120
timeout: 5m

.pre-commit-config.yaml

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

6464
- repo: https://github.com/golangci/golangci-lint
65-
rev: v1.59.1
65+
rev: v2.4.0
6666
hooks:
6767
- id: golangci-lint-full
6868
args: ["-v"]

Dockerfile

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

55
FROM $GOLANG_BUILDER AS builder

Makefile

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

5959
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6060
ifeq (,$(shell go env GOBIN))
@@ -112,9 +112,10 @@ tidy: ## Run go mod tidy on every mod file in the repo
112112
go mod tidy
113113
cd ./api && go mod tidy
114114

115+
GOLANGCI_LINT_VERSION ?= v2.4.0
115116
.PHONY: golangci-lint
116117
golangci-lint:
117-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1
118+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
118119
$(LOCALBIN)/golangci-lint run --fix
119120

120121
PROCS?=$(shell expr $(shell nproc --ignore 2) / 2)
@@ -201,8 +202,8 @@ GINKGO ?= $(LOCALBIN)/ginkgo
201202

202203
## Tool Versions
203204
KUSTOMIZE_VERSION ?= v3.8.7
204-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
205-
GOTOOLCHAIN_VERSION ?= go1.21.0
205+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
206+
GOTOOLCHAIN_VERSION ?= go1.24.0
206207

207208
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
208209
.PHONY: kustomize
@@ -223,7 +224,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
223224
.PHONY: envtest
224225
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
225226
$(ENVTEST): $(LOCALBIN)
226-
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
227+
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
227228

228229
.PHONY: ginkgo
229230
ginkgo: $(GINKGO) ## Download ginkgo locally if necessary.

api/bases/test.openstack.org_ansibletests.yaml

Lines changed: 91 additions & 24 deletions
Large diffs are not rendered by default.

api/bases/test.openstack.org_horizontests.yaml

Lines changed: 85 additions & 22 deletions
Large diffs are not rendered by default.

api/bases/test.openstack.org_tempests.yaml

Lines changed: 91 additions & 24 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)