Skip to content

Commit 8d1c90c

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 - Dockerfile.agent: go-toolset:1.24 -> go-toolset:1.26 - ginkgo: v2.28.2 -> v2.32.0 - gomega: v1.42.0 -> v1.42.1 - golang.org/x/crypto: v0.48.0 -> v0.54.0 - golang.org/x/net: v0.49.0 -> v0.56.0 - golang.org/x/sys: v0.41.0 -> v0.47.0 - golang.org/x/text: v0.34.0 -> v0.40.0 - golang.org/x/tools: v0.41.0 -> v0.47.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. 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 158148a commit 8d1c90c

15 files changed

Lines changed: 107 additions & 88 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-openstack-baremetal-operator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
needs: [build-openstack-baremetal-operator-agent]
2828
with:
2929
operator_name: openstack-baremetal
30-
go_version: 1.24.x
31-
operator_sdk_version: 1.41.1
30+
go_version: 1.26.x
31+
operator_sdk_version: 1.42.3
3232
secrets:
3333
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}
3434
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: openstack-baremetal
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: openstack-baremetal
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
@@ -36,7 +36,7 @@ repos:
3636
- id: go-mod-tidy
3737

3838
- repo: https://github.com/golangci/golangci-lint
39-
rev: v2.7.2
39+
rev: v2.12.2
4040
hooks:
4141
- id: golangci-lint-full
4242
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

Dockerfile.agent

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:latest
33

44
# Build the manager binary

Makefile

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

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

5555
# Image URL to use all building/pushing image targets
5656
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/openstack-baremetal-operator:latest
@@ -88,7 +88,7 @@ SHELL = /usr/bin/env bash -o pipefail
8888
# Extra vars which will be passed to the Docker-build
8989
DOCKER_BUILD_ARGS ?=
9090

91-
GOTOOLCHAIN_VERSION ?= go1.24.0
91+
GOTOOLCHAIN_VERSION ?= go1.26.0
9292

9393
.PHONY: all
9494
all: build
@@ -354,10 +354,10 @@ govet: get-ci-tools
354354
# Run go test against code
355355
gotest: test
356356

357-
GOLANGCI_LINT_VERSION ?= v2.7.2
357+
GOLANGCI_LINT_VERSION ?= v2.12.2
358358
.PHONY: golangci-lint
359359
golangci-lint:
360-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
360+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://golangci-lint.run/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
361361
$(LOCALBIN)/golangci-lint run --fix
362362

363363
.PHONY: vulncheck

0 commit comments

Comments
 (0)