From f354ff267168732afb0c697d3310cfe002306369 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Tue, 20 Oct 2026 09:50:50 -0400 Subject: [PATCH 1/2] Upgrade Go to 1.26 and update build tooling Update the UBI9 builder, CI tools, and controller generator for Go 1.26. Regenerate CRDs and RBAC and refresh development documentation. Assisted-by: GPT-6 Signed-off-by: Michael Valdron --- .github/workflows/ci.yaml | 12 ++-- Dockerfile | 2 +- Makefile | 9 ++- README.md | 6 +- ...file.io_clusterdevfileregistrieslists.yaml | 21 ++----- ...registry.devfile.io_devfileregistries.yaml | 21 ++----- ...try.devfile.io_devfileregistrieslists.yaml | 21 ++----- config/rbac/role.yaml | 59 +++---------------- go.mod | 2 +- 9 files changed, 37 insertions(+), 116 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8d2944f..e33c0c4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,11 +50,8 @@ jobs: fi - name: Check format run: | - go get github.com/google/addlicense@v1.1.1 go install github.com/google/addlicense@v1.1.1 - go get golang.org/x/tools/cmd/goimports@v0.24.0 - go install golang.org/x/tools/cmd/goimports@v0.24.0 - git reset HEAD --hard + go install golang.org/x/tools/cmd/goimports@v0.52.0 make fmt if [[ ! -z $(git status -s) ]] @@ -80,7 +77,7 @@ jobs: - name: Run Gosec Security Scanner run: | - go install github.com/securego/gosec/v2/cmd/gosec@e0cca6fe95306b7e7790d6f1bf6a7bec6d622459 # v2.22.0 + go install github.com/securego/gosec/v2/cmd/gosec@v2.29.0 make gosec if [[ $? != 0 ]] then @@ -105,6 +102,11 @@ jobs: - name: Set up QEMU # Enables arm64 image building uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 + - name: Set up Go 1.x + uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 + with: + go-version-file: "go.mod" + - name: Check if operator docker build is working run: make docker-buildx-build diff --git a/Dockerfile b/Dockerfile index 41cf50b..f2e4cf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # Build the manager binary -FROM registry.access.redhat.com/ubi9/go-toolset:1.24.4-1754467841@sha256:3f552f246b4bd5bdfb4da0812085d381d00d3625769baecaed58c2667d344e5c as builder +FROM registry.access.redhat.com/ubi9/go-toolset:1.26.7-1792425967@sha256:68d6b72cc3eb4c7975b2aca2451f6601c048c095d6b5fc2a310ce3df5ef2ada6 AS builder ARG TARGETARCH=amd64 USER root diff --git a/Makefile b/Makefile index 5ae8480..1ddaed6 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ ENVTEST_VERSION=v0.0.0-20240405143037-c25fe2f5ca0f # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.26 # Controller tools version number -CONTROLLER_TOOLS_VERSION ?= v0.14.0 +CONTROLLER_TOOLS_VERSION ?= v0.23.0 # Kustomize version number KUSTOMIZE_VERSION ?= v3.8.7 @@ -283,9 +283,8 @@ uninstall-cert: # find or download controller-gen # download controller-gen if necessary .PHONY: controller-gen -controller-gen: $(CONTROLLER_GEN) -$(CONTROLLER_GEN): $(LOCALBIN) - test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \ +controller-gen: $(LOCALBIN) + test -s $(CONTROLLER_GEN) && $(CONTROLLER_GEN) --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \ GOBIN=$(LOCALBIN) GOFLAGS="" go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) ##@ Deployment @@ -340,5 +339,5 @@ bundle-push: .PHONY: gosec gosec: # Run this command to install gosec, if not installed: - # go install github.com/securego/gosec/v2/cmd/gosec@v2.22.0 + # go install github.com/securego/gosec/v2/cmd/gosec@v2.29.0 gosec -no-fail -fmt=sarif -out=gosec.sarif -exclude-dir pkg/test -exclude-dir tests ./... diff --git a/README.md b/README.md index 040ff0a..fd4da6d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@