Skip to content

Commit d5b65e1

Browse files
stuggiclaude
authored 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.6-1762230058 -> 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 - ginkgo: v2.28.2 -> v2.32.0 - gomega: v1.42.0 -> v1.42.1 - golang.org/x/crypto: v0.48.0 -> v0.54.0 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 8ca0f06 commit d5b65e1

14 files changed

Lines changed: 116 additions & 107 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-watcher-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: watcher
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: watcher
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: watcher
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
@@ -79,7 +79,7 @@ repos:
7979
# E012: here doc didn't end before EOF
8080

8181
- repo: https://github.com/golangci/golangci-lint
82-
rev: v2.7.2
82+
rev: v2.12.2
8383
hooks:
8484
- id: golangci-lint-full
8585
args: ["-v"]

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# TODO(amoralej) go-toolset image pinned until a fix is provided for
2-
# https://issues.redhat.com/browse/RHEL-128838
3-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24.6-1762230058
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.26
42
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:9.6
53

64
# 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/watcher-operator:latest
@@ -68,7 +68,7 @@ endif
6868
SHELL = /usr/bin/env bash -o pipefail
6969
.SHELLFLAGS = -ec
7070

71-
GOTOOLCHAIN_VERSION ?= go1.24.0
71+
GOTOOLCHAIN_VERSION ?= go1.26.0
7272

7373
.PHONY: all
7474
all: build
@@ -133,11 +133,11 @@ tidy: ## Run go mod tidy on every mod file in the repo
133133
go mod tidy
134134
cd ./api && go mod tidy
135135

136-
GOLANGCI_LINT_VERSION ?= v2.7.2
136+
GOLANGCI_LINT_VERSION ?= v2.12.2
137137
.PHONY: golangci-lint
138138
golangci-lint:
139139
# NOTE this will install golangci-lint in to local bin dir
140-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
140+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://golangci-lint.run/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
141141
$(LOCALBIN)/golangci-lint run --fix
142142

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

api/go.mod

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

3-
go 1.24.4
4-
5-
toolchain go1.24.6
3+
go 1.26.3
64

75
require (
86
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260626110212-c33a1507c26f
9-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260626101608-0959e9d46047
7+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260713090837-13a3b65580c3
108
k8s.io/api v0.31.14
119
k8s.io/apimachinery v0.31.14
1210
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
@@ -50,11 +48,11 @@ require (
5048
go.yaml.in/yaml/v2 v2.4.2 // indirect
5149
go.yaml.in/yaml/v3 v3.0.4 // indirect
5250
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
53-
golang.org/x/net v0.49.0 // indirect
51+
golang.org/x/net v0.56.0 // indirect
5452
golang.org/x/oauth2 v0.30.0 // indirect
55-
golang.org/x/sys v0.41.0 // indirect
56-
golang.org/x/term v0.40.0 // indirect
57-
golang.org/x/text v0.34.0 // indirect
53+
golang.org/x/sys v0.47.0 // indirect
54+
golang.org/x/term v0.45.0 // indirect
55+
golang.org/x/text v0.40.0 // indirect
5856
golang.org/x/time v0.12.0 // indirect
5957
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
6058
google.golang.org/protobuf v1.36.7 // indirect
@@ -87,7 +85,4 @@ replace k8s.io/code-generator => k8s.io/code-generator v0.31.14 //allow-merging
8785

8886
replace k8s.io/component-base => k8s.io/component-base v0.31.14 //allow-merging
8987

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

0 commit comments

Comments
 (0)