Skip to content

Commit c83d830

Browse files
authored
Merge pull request #635 from stuggi/golang_1.24
bump to golang 1.24
2 parents 295824b + 400ff56 commit c83d830

File tree

98 files changed

+4049
-1090
lines changed

Some content is hidden

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

98 files changed

+4049
-1090
lines changed

.github/workflows/golangci-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Install Go
1111
uses: actions/setup-go@v2
1212
with:
13-
go-version: 1.21.x
13+
go-version: 1.24.x
1414
- name: Checkout project code
1515
uses: actions/checkout@v2
1616
- name: Run govet.sh

.golangci.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
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
1011
- errname
1112
- err113
12-
linters-settings:
13-
revive:
14-
rules:
15-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
13+
14+
settings:
15+
revive:
16+
rules:
1617
- name: unused-parameter
1718
severity: warning
1819
disabled: true
20+
21+
formatters:
22+
enable:
23+
- gofmt
24+
1925
run:
2026
timeout: 5m

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
1818
GINKGO ?= $(LOCALBIN)/ginkgo
1919

2020
## Tool Versions
21-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
22-
GOTOOLCHAIN_VERSION ?= go1.21.0
23-
GOLANGCI_VERSION ?= v1.64.8
21+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
22+
GOTOOLCHAIN_VERSION ?= go1.24.0
23+
GOLANGCI_LINT_VERSION ?= v2.4.0
2424

2525
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
26-
ENVTEST_K8S_VERSION = 1.29
26+
ENVTEST_K8S_VERSION = 1.31
2727

2828
# Number of CPUs to be allocacted for testing
2929
PROCS?=$(shell expr $(shell nproc --ignore 2) / 2)
@@ -90,7 +90,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
9090
.PHONY: envtest
9191
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
9292
$(ENVTEST): $(LOCALBIN)
93-
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
93+
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
9494

9595
.PHONY: ginkgo
9696
ginkgo: $(GINKGO) ## Download ginkgo locally if necessary.
@@ -124,7 +124,7 @@ gotest: get-ci-tools envtest ## Run go test via ci-tools script against code
124124
.PHONY: golangci
125125
golangci: get-ci-tools ## Run golangci-lint test via ci-tools script against code
126126
for mod in $(shell find modules/ -maxdepth 1 -mindepth 1 -type d); do \
127-
GOLANGCI_TAG=$(GOLANGCI_VERSION) GOWORK=off $(CI_TOOLS_REPO_DIR)/test-runner/golangci.sh ./$$mod || exit 1 ; \
127+
GOLANGCI_TAG=$(GOLANGCI_LINT_VERSION) GOWORK=off $(CI_TOOLS_REPO_DIR)/test-runner/golangci.sh ./$$mod || exit 1 ; \
128128
done
129129

130130
.PHONY: golint

modules/ansible/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module github.com/openstack-k8s-operators/lib-common/modules/ansible
22

3-
go 1.21
3+
go 1.24
44

55
require gopkg.in/yaml.v3 v3.0.1
66

77
require (
88
github.com/kr/pretty v0.3.1 // indirect
9-
github.com/rogpeppe/go-internal v1.11.0 // indirect
9+
github.com/rogpeppe/go-internal v1.12.0 // indirect
1010
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
1111
)

modules/ansible/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
88
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
99
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
1010
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
11-
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
12-
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
11+
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
12+
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
1313
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1414
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
1515
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

modules/certmanager/certificate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (c *Certificate) Delete(
158158

159159
err := h.GetClient().Delete(ctx, c.certificate)
160160
if err != nil && !k8s_errors.IsNotFound(err) {
161-
return fmt.Errorf("Error deleting certificate %s: %w", c.certificate.Name, err)
161+
return fmt.Errorf("error deleting certificate %s: %w", c.certificate.Name, err)
162162
}
163163

164164
return nil
@@ -177,7 +177,7 @@ func EnsureCert(
177177

178178
err := helper.GetClient().Get(ctx, types.NamespacedName{Name: request.IssuerName, Namespace: namespace}, issuer)
179179
if err != nil {
180-
err = fmt.Errorf("Error getting issuer %s/%s - %w", request.IssuerName, namespace, err)
180+
err = fmt.Errorf("error getting issuer %s/%s - %w", request.IssuerName, namespace, err)
181181

182182
return nil, ctrl.Result{}, err
183183
}

modules/certmanager/go.mod

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/openstack-k8s-operators/lib-common/modules/certmanager
22

3-
go 1.21
3+
go 1.24
44

55
require (
66
github.com/cert-manager/cert-manager v1.11.5
@@ -11,20 +11,21 @@ require (
1111
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240122120141-2eff3281aef1
1212
go.uber.org/zap v1.27.0
1313
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
14-
k8s.io/api v0.29.15
15-
k8s.io/apimachinery v0.29.15
16-
k8s.io/client-go v0.29.15
17-
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
18-
sigs.k8s.io/controller-runtime v0.17.6
14+
k8s.io/api v0.31.12
15+
k8s.io/apimachinery v0.31.12
16+
k8s.io/client-go v0.31.12
17+
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
18+
sigs.k8s.io/controller-runtime v0.19.7
1919
)
2020

2121
require (
2222
github.com/beorn7/perks v1.0.1 // indirect
23-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
23+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2424
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2525
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
2626
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
2727
github.com/fsnotify/fsnotify v1.7.0 // indirect
28+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
2829
github.com/go-logr/zapr v1.3.0 // indirect
2930
github.com/go-openapi/jsonpointer v0.21.0 // indirect
3031
github.com/go-openapi/jsonreference v0.21.0 // indirect
@@ -47,28 +48,27 @@ require (
4748
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4849
github.com/openshift/api v3.9.0+incompatible // indirect
4950
github.com/pkg/errors v0.9.1 // indirect
50-
github.com/prometheus/client_golang v1.19.0 // indirect
51-
github.com/prometheus/client_model v0.6.0 // indirect
52-
github.com/prometheus/common v0.51.1 // indirect
53-
github.com/prometheus/procfs v0.13.0 // indirect
51+
github.com/prometheus/client_golang v1.19.1 // indirect
52+
github.com/prometheus/client_model v0.6.1 // indirect
53+
github.com/prometheus/common v0.55.0 // indirect
54+
github.com/prometheus/procfs v0.15.1 // indirect
5455
github.com/spf13/pflag v1.0.5 // indirect
56+
github.com/x448/float16 v0.8.4 // indirect
5557
go.uber.org/multierr v1.11.0 // indirect
5658
golang.org/x/net v0.28.0 // indirect
57-
golang.org/x/oauth2 v0.18.0 // indirect
59+
golang.org/x/oauth2 v0.21.0 // indirect
5860
golang.org/x/sys v0.23.0 // indirect
5961
golang.org/x/term v0.23.0 // indirect
6062
golang.org/x/text v0.17.0 // indirect
6163
golang.org/x/time v0.5.0 // indirect
6264
golang.org/x/tools v0.24.0 // indirect
6365
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
64-
google.golang.org/appengine v1.6.8 // indirect
65-
google.golang.org/protobuf v1.34.1 // indirect
66+
google.golang.org/protobuf v1.34.2 // indirect
6667
gopkg.in/inf.v0 v0.9.1 // indirect
6768
gopkg.in/yaml.v2 v2.4.0 // indirect
6869
gopkg.in/yaml.v3 v3.0.1 // indirect
69-
k8s.io/apiextensions-apiserver v0.29.15 // indirect
70-
k8s.io/component-base v0.29.15 // indirect
71-
k8s.io/klog/v2 v2.120.1 // indirect
70+
k8s.io/apiextensions-apiserver v0.31.0 // indirect
71+
k8s.io/klog/v2 v2.130.1 // indirect
7272
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect
7373
sigs.k8s.io/gateway-api v0.6.0 // indirect
7474
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
@@ -82,6 +82,6 @@ replace github.com/openstack-k8s-operators/lib-common/modules/test => ../test
8282

8383
replace github.com/openstack-k8s-operators/lib-common/modules/openstack => ../openstack
8484

85-
// mschuppert: map to latest commit from release-4.16 tag
85+
// mschuppert: map to latest commit from release-4.18 tag
8686
// must consistent within modules and service operators
87-
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094
87+
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e

0 commit comments

Comments
 (0)