From 19b01911534555cdd60c01116af1fb620cd29819 Mon Sep 17 00:00:00 2001 From: Yury Kovalev Date: Tue, 26 May 2026 13:58:29 +0200 Subject: [PATCH 1/4] chore(deps): bump golang version to 1.26 --- .github/workflows/aws-integration.yaml | 2 +- .github/workflows/ci.yaml | 4 ++-- .github/workflows/emailsender-central-compatibility.yaml | 2 +- .golangci.yml | 2 +- .openshift-ci/e2e-runtime/Dockerfile | 2 +- CLAUDE.md | 2 +- Dockerfile | 2 +- README.md | 2 +- emailsender/Dockerfile | 2 +- go.mod | 2 +- probe/Dockerfile | 2 +- tools/go.mod | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/aws-integration.yaml b/.github/workflows/aws-integration.yaml index 57cf325ae0..f7e9f7c4af 100644 --- a/.github/workflows/aws-integration.yaml +++ b/.github/workflows/aws-integration.yaml @@ -50,7 +50,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.26" - name: Check out code into the Go module directory uses: actions/checkout@v6 - name: Cache go module diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f094344cc..0738d10cfd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,7 +33,7 @@ jobs: python-version: '3.12' - uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.26" - uses: pre-commit/action@v3.0.1 - uses: pre-commit/action@v3.0.1 name: Verify generated files are up-to-date @@ -81,7 +81,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.26" - name: Check out code into the Go module directory uses: actions/checkout@v6 - name: Cache go module diff --git a/.github/workflows/emailsender-central-compatibility.yaml b/.github/workflows/emailsender-central-compatibility.yaml index 4876ec761a..530edcb91d 100644 --- a/.github/workflows/emailsender-central-compatibility.yaml +++ b/.github/workflows/emailsender-central-compatibility.yaml @@ -35,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.26" - name: Cache go module uses: actions/cache@v5 with: diff --git a/.golangci.yml b/.golangci.yml index 250f362bbb..e94c47f73c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ version: "2" run: - go: 1.25.3 + go: 1.26.2 linters: default: none enable: diff --git a/.openshift-ci/e2e-runtime/Dockerfile b/.openshift-ci/e2e-runtime/Dockerfile index 8f5499af2f..106f475ab1 100644 --- a/.openshift-ci/e2e-runtime/Dockerfile +++ b/.openshift-ci/e2e-runtime/Dockerfile @@ -5,7 +5,7 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial RUN dnf update -y --disablerepo=\* --enablerepo=baseos,appstream && dnf -y install procps make which git gettext jq gcc && dnf clean all && rm -rf /var/cache/dnf -COPY --from=registry.redhat.io/ubi9/go-toolset:1.25 /usr/lib/golang /usr/lib/golang +COPY --from=registry.redhat.io/ubi9/go-toolset:1.26 /usr/lib/golang /usr/lib/golang COPY --from=quay.io/openshift/origin-cli:4.21 /usr/bin/oc /usr/bin ENV GOPATH=/go diff --git a/CLAUDE.md b/CLAUDE.md index a848fff56e..ce834957f8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -151,7 +151,7 @@ The codebase follows a dependency injection pattern using the `goava/di` framewo ## Development Workflow ### Environment Setup -1. Install prerequisites: Go 1.25+, Docker, Node.js, Java, OCM CLI +1. Install prerequisites: Go 1.26+, Docker, Node.js, Java, OCM CLI 2. Run `make setup/git/hooks` to install pre-commit hooks 3. Use `make deploy/bootstrap` to set up development cluster 4. Run `make deploy/dev` to start local development environment diff --git a/Dockerfile b/Dockerfile index 79f84dde0b..19aafafb30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.25.9@sha256:e06a6f4c85c3ca75f64127542449c9770fb885adfb592f987c576d268ac108de AS build +FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.26.2@sha256:a82d974dae02330d0669fb0a5ced2ae498bd1bd708359d61493b9fb0dc0748eb AS build USER root RUN mkdir /src /rds_ca diff --git a/README.md b/README.md index 3aaa44edcf..6625b22943 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ ACS fleet-manager repository for the ACS managed service. #### Prerequisites -* [Golang 1.25+](https://golang.org/dl/) +* [Golang 1.26+](https://golang.org/dl/) * [Docker](https://docs.docker.com/get-docker/) - to create database * [ocm cli](https://github.com/openshift-online/ocm-cli/releases) - ocm command line tool * [Node.js v12.20+](https://nodejs.org/en/download/) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) diff --git a/emailsender/Dockerfile b/emailsender/Dockerfile index 28927216ed..02d66719c2 100644 --- a/emailsender/Dockerfile +++ b/emailsender/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/go-toolset:1.25.9@sha256:e06a6f4c85c3ca75f64127542449c9770fb885adfb592f987c576d268ac108de AS build +FROM registry.access.redhat.com/ubi9/go-toolset:1.26.2@sha256:a82d974dae02330d0669fb0a5ced2ae498bd1bd708359d61493b9fb0dc0748eb AS build USER root ENV GOFLAGS="-mod=mod" diff --git a/go.mod b/go.mod index 64c4812159..7580b6d643 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/stackrox/acs-fleet-manager -go 1.25.0 +go 1.26.0 require ( github.com/DATA-DOG/go-sqlmock v1.5.2 diff --git a/probe/Dockerfile b/probe/Dockerfile index 8ebf5fd000..a774f50c33 100644 --- a/probe/Dockerfile +++ b/probe/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.25.9@sha256:e06a6f4c85c3ca75f64127542449c9770fb885adfb592f987c576d268ac108de AS build +FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.26.2@sha256:a82d974dae02330d0669fb0a5ced2ae498bd1bd708359d61493b9fb0dc0748eb AS build USER root ENV GOFLAGS="-mod=mod" diff --git a/tools/go.mod b/tools/go.mod index f483bc7a7d..7694e8ef32 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module github.com/stackrox/acs-fleet-manager/tools -go 1.25.0 +go 1.26.0 require ( github.com/matryer/moq v0.5.2 From 7f44593920b84f4b9b412c763e63cefd285c56e8 Mon Sep 17 00:00:00 2001 From: Yury Kovalev Date: Wed, 27 May 2026 10:20:29 +0200 Subject: [PATCH 2/4] Bump pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5da30a76f8..764464c83e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: - id: detect-secrets args: ["--baseline", ".secrets.baseline"] - repo: https://github.com/golangci/golangci-lint - rev: v2.8.0 + rev: v2.12.2 hooks: - id: golangci-lint - repo: https://github.com/pre-commit/pre-commit-hooks From f8391a69c8a7a5dc227ea84f04198ea05fb3cf1e Mon Sep 17 00:00:00 2001 From: Yury Kovalev Date: Wed, 27 May 2026 11:43:21 +0200 Subject: [PATCH 3/4] Fix govet --- internal/central/pkg/services/central.go | 4 ++-- pkg/handlers/framework.go | 2 +- pkg/shared/handle_error.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/central/pkg/services/central.go b/internal/central/pkg/services/central.go index ea5be03743..a7c5fbabdf 100644 --- a/internal/central/pkg/services/central.go +++ b/internal/central/pkg/services/central.go @@ -286,7 +286,7 @@ func (k *centralService) RegisterCentralJob(ctx context.Context, centralRequest return errors.NewWithCause(errors.ErrorGeneral, err, "failed to create central request") } else if !hasCapacity { errorMsg := fmt.Sprintf("Cluster capacity(%d) exhausted in %s region", int64(k.dataplaneClusterConfig.ClusterConfig.GetCapacityForRegion(centralRequest.Region)), centralRequest.Region) - logger.Logger.Warningf(errorMsg) + logger.Logger.Warningf("%s", errorMsg) return errors.TooManyCentralInstancesReached("%s", errorMsg) } @@ -297,7 +297,7 @@ func (k *centralService) RegisterCentralJob(ctx context.Context, centralRequest cluster, e := k.clusterPlacementStrategy.FindCluster(centralRequest) if e != nil || cluster == nil { msg := fmt.Sprintf("No available cluster found for '%s' central instance in region: '%s'", centralRequest.InstanceType, centralRequest.Region) - logger.Logger.Errorf(msg) + logger.Logger.Errorf("%s", msg) return errors.TooManyCentralInstancesReached("Region %s cannot accept instance type: %s at this moment", centralRequest.Region, centralRequest.InstanceType) } centralRequest.ClusterID = cluster.ClusterID diff --git a/pkg/handlers/framework.go b/pkg/handlers/framework.go index 955a54eadd..cfe9d664c0 100644 --- a/pkg/handlers/framework.go +++ b/pkg/handlers/framework.go @@ -190,7 +190,7 @@ func HandleList(w http.ResponseWriter, r *http.Request, cfg *HandlerConfig) { ulog := logger.NewUHCLogger(ctx) // If this is a 400 error, its the user's issue, log as info rather than error if err.HTTPCode >= 400 && err.HTTPCode <= 499 { - ulog.Infof(err.Error()) + ulog.Infof("%s", err.Error()) } else { ulog.Error(err) } diff --git a/pkg/shared/handle_error.go b/pkg/shared/handle_error.go index a210cd015a..680ff3fdd5 100644 --- a/pkg/shared/handle_error.go +++ b/pkg/shared/handle_error.go @@ -13,7 +13,7 @@ func HandleError(r *http.Request, w http.ResponseWriter, err *errors.ServiceErro ulog := logger.NewUHCLogger(ctx) operationID := logger.GetOperationID(ctx) if err.HTTPCode >= 400 && err.HTTPCode <= 499 { - ulog.Infof(err.Error()) + ulog.Infof("%s", err.Error()) } else { ulog.Error(err) } From b26c90576f43e3678e4ce8038b9785a4a782e860 Mon Sep 17 00:00:00 2001 From: Yury Kovalev Date: Thu, 28 May 2026 14:59:12 +0200 Subject: [PATCH 4/4] Remove shadowutils as it's already present --- Dockerfile | 2 -- emailsender/Dockerfile | 2 -- probe/Dockerfile | 2 -- 3 files changed, 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19aafafb30..4c188e9f8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,6 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \ FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:12db9874bd753eb98b1ab3d840e75de5d6842ac0604fbd68c012adefe97140be AS standard -RUN microdnf install shadow-utils - RUN useradd -u 1001 unprivilegeduser # Switch to non-root user USER unprivilegeduser diff --git a/emailsender/Dockerfile b/emailsender/Dockerfile index 02d66719c2..e7953e2cff 100644 --- a/emailsender/Dockerfile +++ b/emailsender/Dockerfile @@ -12,8 +12,6 @@ RUN make emailsender FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:12db9874bd753eb98b1ab3d840e75de5d6842ac0604fbd68c012adefe97140be AS standard -RUN microdnf install shadow-utils - RUN useradd -u 1001 unprivilegeduser ADD https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem /rds_ca/aws-rds-ca-global-bundle.pem RUN chmod a+rw /rds_ca/aws-rds-ca-global-bundle.pem diff --git a/probe/Dockerfile b/probe/Dockerfile index a774f50c33..8c208557d5 100644 --- a/probe/Dockerfile +++ b/probe/Dockerfile @@ -14,8 +14,6 @@ RUN make probe GOOS=linux GOARCH=${TARGETARCH} FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:12db9874bd753eb98b1ab3d840e75de5d6842ac0604fbd68c012adefe97140be as standard -RUN microdnf install shadow-utils - RUN useradd -u 1001 unprivilegeduser # Switch to non-root user USER unprivilegeduser