Skip to content

Commit b1576f0

Browse files
stuggiclaude
andcommitted
Bump Go to 1.26.3
- Go: 1.24.4 -> 1.26.3 - operator-sdk: v1.41.1 -> v1.42.3 - golangci-lint: v2.7.2 -> v2.12.2 - GOTOOLCHAIN_VERSION: go1.24.0 -> go1.26.0 - go-toolset image: 1.24 -> 1.26 - .ci-operator.yaml: ci-build-root-golang-1.24-sdk-1.41.1 -> ci-build-root-golang-1.26-sdk-1.42.3 - golangci-lint install URL updated to https://golangci-lint.run/install.sh - ginkgo: v2.28.2 -> v2.32.0 - gomega: v1.42.0 -> v1.42.1 - golang.org/x/* transitive deps updated Also adds .github/workflows/lints.yaml , like we have in the other repositories to check for replace lines which should be removed before merging. Also no longer depend on the rabbitmq cluster-operator, removing dead replace in go.mod. Jira: OSPRH-30997 Depends-On: openstack-k8s-operators/lib-common#715 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent e4d0cf3 commit b1576f0

14 files changed

Lines changed: 105 additions & 92 deletions

.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.24-sdk-1.41.1
4+
tag: ci-build-root-golang-1.26-sdk-1.42.3

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
1717
with:
1818
operator_name: swift
19-
go_version: 1.24.x
20-
operator_sdk_version: 1.41.1
19+
go_version: 1.26.x
20+
operator_sdk_version: 1.42.3
2121
secrets:
2222
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}
2323
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
with:
1010
operator_name: swift
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.41.1
12+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.26-sdk-1.42.3
1313
secrets:
1414
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-branches.yaml@main
1111
with:
1212
operator_name: swift
13-
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.41.1
13+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.26-sdk-1.42.3
1414
secrets:
1515
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

.github/workflows/lints.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lints
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check-go-mod-replace-lines:
7+
name: check for replace lines in go.mod files
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout project code
11+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
12+
- name: check for replace lines in go.mod files
13+
run: |
14+
! egrep --invert-match -e '^replace.*/api => \./api|^replace.*//allow-merging$' `find . -name 'go.mod'` | egrep -e 'go.mod:replace'

.golangci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ linters:
1111
- gosec
1212
- errname
1313
- err113
14+
settings:
15+
govet:
16+
disable:
17+
# TODO: re-enable once golangci-lint supports Go 1.26 inlining of generics
18+
- inline
1419

1520
formatters:
1621
enable:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repos:
4242
- id: go-mod-tidy
4343

4444
- repo: https://github.com/golangci/golangci-lint
45-
rev: v2.7.2
45+
rev: v2.12.2
4646
hooks:
4747
- id: golangci-lint-full
4848
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.24
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.26
22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.6
33

44
# Build the manager binary

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ endif
4848

4949
# Set the Operator SDK version to use. By default, what is installed on the system is used.
5050
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51-
OPERATOR_SDK_VERSION ?= v1.41.1
51+
OPERATOR_SDK_VERSION ?= v1.42.3
5252

5353
# Image URL to use all building/pushing image targets
5454
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/swift-operator:latest
@@ -57,7 +57,7 @@ IMG ?= $(DEFAULT_IMG)
5757
ENVTEST_K8S_VERSION = 1.31
5858

5959
# Set minimum Go version
60-
GOTOOLCHAIN_VERSION ?= go1.24.0
60+
GOTOOLCHAIN_VERSION ?= go1.26.0
6161

6262
GINKGO ?= $(LOCALBIN)/ginkgo
6363

@@ -121,10 +121,10 @@ tidy: ## Run go mod tidy on every mod file in the repo
121121
go mod tidy
122122
cd ./api && go mod tidy
123123

124-
GOLANGCI_LINT_VERSION ?= v2.7.2
124+
GOLANGCI_LINT_VERSION ?= v2.12.2
125125
.PHONY: golangci-lint
126126
golangci-lint:
127-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
127+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://golangci-lint.run/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
128128
$(LOCALBIN)/golangci-lint run --fix --verbose
129129

130130
PROCS?=$(shell expr $(shell nproc --ignore 2) / 2)

api/go.mod

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/openstack-k8s-operators/swift-operator/api
22

3-
go 1.24.4
3+
go 1.26.3
44

55
require (
66
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260710123700-a3202d382314
7-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260704173810-7bc44d3d79e5
7+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260713090837-13a3b65580c3
88
k8s.io/api v0.31.14
99
k8s.io/apimachinery v0.31.14
1010
sigs.k8s.io/controller-runtime v0.19.7
@@ -47,11 +47,11 @@ require (
4747
go.yaml.in/yaml/v2 v2.4.2 // indirect
4848
go.yaml.in/yaml/v3 v3.0.4 // indirect
4949
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
50-
golang.org/x/net v0.49.0 // indirect
50+
golang.org/x/net v0.56.0 // indirect
5151
golang.org/x/oauth2 v0.30.0 // indirect
52-
golang.org/x/sys v0.41.0 // indirect
53-
golang.org/x/term v0.40.0 // indirect
54-
golang.org/x/text v0.34.0 // indirect
52+
golang.org/x/sys v0.47.0 // indirect
53+
golang.org/x/term v0.45.0 // indirect
54+
golang.org/x/text v0.40.0 // indirect
5555
golang.org/x/time v0.12.0 // indirect
5656
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
5757
google.golang.org/protobuf v1.36.7 // indirect
@@ -91,7 +91,4 @@ replace k8s.io/component-base => k8s.io/component-base v0.31.14 //allow-merging
9191

9292
replace sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.19.7 //allow-merging
9393

94-
// custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.16.0_patches)
95-
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250929174222-a0d328fa4dec //allow-merging
96-
9794
replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250627150254-e9823e99808e //allow-merging

0 commit comments

Comments
 (0)