Skip to content

[golang] bump to golang 1.22 #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: tools
namespace: openstack-k8s-operators
tag: ci-build-root-golang-1.21-sdk-1.31
tag: ci-build-root-golang-1.22-sdk-1.31
2 changes: 1 addition & 1 deletion .github/workflows/build-placement-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
with:
operator_name: placement
go_version: 1.21.x
go_version: 1.22.x
operator_sdk_version: 1.31.0
secrets:
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
- id: go-mod-tidy

- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
rev: v1.63.4
hooks:
- id: golangci-lint-full
args: ["--verbose"]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest

# Build the manager binary
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ endif
SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec

GOTOOLCHAIN_VERSION ?= go1.21.0
GOTOOLCHAIN_VERSION ?= go1.22.0

.PHONY: all
all: build
Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openstack-k8s-operators/placement-operator/api

go 1.21
go 1.22

require (
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250416140801-46d35b7999b2
Expand Down
6 changes: 3 additions & 3 deletions controllers/placementapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func ensureSecret(
condition.InputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf("Input data resources missing: %s", "secret/"+secretName.Name)))
"%s", fmt.Sprintf("Input data resources missing: %s", "secret/"+secretName.Name)))
return "",
ctrl.Result{},
*secret,
Expand Down Expand Up @@ -381,7 +381,7 @@ func (r *PlacementAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName)))
condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand All @@ -406,7 +406,7 @@ func (r *PlacementAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error())))
condition.TLSInputReadyWaitingMessage, err.Error()))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openstack-k8s-operators/placement-operator

go 1.21
go 1.22

require (
github.com/go-logr/logr v1.4.2
Expand Down