Skip to content
Merged
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 .github/workflows/aws-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/emailsender-central-compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "2"
run:
go: 1.25.3
go: 1.26.2
linters:
default: none
enable:
Expand Down
2 changes: 1 addition & 1 deletion .openshift-ci/e2e-runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

@coderabbitai coderabbitai Bot May 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Platform specification conflicts with coding guidelines.

The --platform=$BUILDPLATFORM allows dynamic platform selection, but the coding guidelines specify that container images should be built for linux/amd64 platform. Consider using --platform=linux/amd64 instead to ensure consistent builds. As per coding guidelines, "Build container images for linux/amd64 platform" for Dockerfile*.

📝 Proposed fix
-FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.26.2@sha256:a82d974dae02330d0669fb0a5ced2ae498bd1bd708359d61493b9fb0dc0748eb AS build
+FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/go-toolset:1.26.2@sha256:a82d974dae02330d0669fb0a5ced2ae498bd1bd708359d61493b9fb0dc0748eb AS build
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.26.2@sha256:a82d974dae02330d0669fb0a5ced2ae498bd1bd708359d61493b9fb0dc0748eb AS build
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/go-toolset:1.26.2@sha256:a82d974dae02330d0669fb0a5ced2ae498bd1bd708359d61493b9fb0dc0748eb AS build
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 1, Update the FROM instruction in the Dockerfile to use a
fixed platform instead of the build-time variable: replace the current
--platform=$BUILDPLATFORM with --platform=linux/amd64 in the FROM line that
defines the build stage (the existing "FROM ... AS build" instruction), so the
image is always built for linux/amd64 per guidelines; keep the same base image
tag/sha and stage name unchanged and rerun your build to verify no breakage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platform selection is made dynamic on purpose to build images on arm chips (mac developer laptops)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kovayur, understood — using $BUILDPLATFORM makes sense for cross-compilation support so developers on ARM Macs can build without emulation. I'll withdraw that comment.


📝 Learnings were identified and not saved (knowledge base disabled). Enable


USER root
RUN mkdir /src /rds_ca
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions emailsender/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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
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/stackrox/acs-fleet-manager

go 1.25.0
go 1.26.0

require (
github.com/DATA-DOG/go-sqlmock v1.5.2
Expand Down
4 changes: 2 additions & 2 deletions internal/central/pkg/services/central.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/shared/handle_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 1 addition & 3 deletions probe/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build is stuck because it prompts to upgrade an existing package:

Upgrading:
shadow-utils-2:4.9-16.el9.x86_64 ubi-9-baseos-rpms 1.3 MB
replacing shadow-utils-2:4.9-15.el9.x86_64
Transaction Summary:
Installing: 0 packages
Reinstalling: 0 packages
Upgrading: 1 packages
Obsoleting: 0 packages
Removing: 0 packages
Downgrading: 0 packages
Is this ok [y/N]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid q but... did we not need this package?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already exists in the base image


RUN useradd -u 1001 unprivilegeduser
# Switch to non-root user
USER unprivilegeduser
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading