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.24"
go-version: "1.25"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- 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.24"
go-version: "1.25"
- 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.24"
go-version: "1.25"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- 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 @@ -36,7 +36,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.24"
go-version: "1.25"
- name: Cache go module
uses: actions/cache@v4
with:
Expand Down
219 changes: 114 additions & 105 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,110 +1,8 @@
# golangci-lint configuration v2
version: 2

version: "2"
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 10m
go: "1.24.7"

issues:
exclude-use-default: false
exclude-files:
- ".*_moq.go"
exclude-dirs:
- "internal/central/pkg/api/public"
- "internal/central/pkg/api/private"
- "internal/central/pkg/api/admin/private"
- "pkg/client/redhatsso/api"
- "emailsender/pkg/client/openapi"
exclude-rules:
- path: _test\.go
linters:
- wrapcheck
- path: pkg/client/fleetmanager/client.go # Ignore wrapcheck for the client, specifically within the RoundTripper.
linters:
- wrapcheck
- linters:
- revive
text: "should have a package comment, unless it's in another file for this package"
- linters:
- revive
text: "should not use dot imports"
- linters:
- revive
text: "returns unexported type .* which can be annoying to use"
- linters:
- revive
text: "error strings should not be capitalized or end with punctuation or a newline"
- linters:
- revive
text: "should omit type int from declaration"
- linters:
- revive
text: "don't use leading k in Go names"

linters-settings:
staticcheck:
# Disable specific staticcheck rules that were excluded in v1 config
# staticcheck now includes both SA (staticcheck) and ST (stylecheck) rules
checks: ["all", "-ST1000", "-ST1001", "-ST1003", "-ST1005", "-SA1019", "-SA4001", "-ST1016"]
gosec:
includes:
- G601
revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
arguments: ["disableStutteringCheck"]
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
govet:
enable-all: true
disable:
- shadow
- fieldalignment
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
- Print
- Printf
- Println
- Debug
- Debugf
- Info
- Infof
- Warn
- Warnf
- Error
- Errorf
gocritic:
enabled-checks:
- commentFormatting
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped
wrapcheck: {}
# ignoreSigRegexps: uncomment to add ignore rules

go: 1.25.3
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
default: none
enable:
- asciicheck
# - bodyclose
Expand Down Expand Up @@ -152,3 +50,114 @@ linters:
# - whitespace
- wrapcheck
# - wsl
settings:
gocritic:
enabled-checks:
- commentFormatting
gosec:
includes:
- G601
govet:
disable:
- shadow
- fieldalignment
enable-all: true
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
- Print
- Printf
- Println
- Debug
- Debugf
- Info
- Infof
- Warn
- Warnf
- Error
- Errorf
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped
revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
arguments:
- disableStutteringCheck
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
# Disable specific staticcheck rules that were excluded in v1 config
# staticcheck now includes both SA (staticcheck) and ST (stylecheck) rules
staticcheck:
checks:
- all
- -SA1019
- -SA4001
- -ST1000
- -ST1001
- -ST1003
- -ST1005
- -ST1016

exclusions:
generated: lax
rules:
- linters:
- wrapcheck
path: _test\.go
# Ignore wrapcheck for the client, specifically within the RoundTripper.
- linters:
- wrapcheck
path: pkg/client/fleetmanager/client.go
- linters:
- revive
text: should have a package comment, unless it's in another file for this package
- linters:
- revive
text: should not use dot imports
- linters:
- revive
text: returns unexported type .* which can be annoying to use
- linters:
- revive
text: error strings should not be capitalized or end with punctuation or a newline
- linters:
- revive
text: should omit type int from declaration
- linters:
- revive
text: don't use leading k in Go names
paths:
- .*_moq.go
- internal/central/pkg/api/public
- internal/central/pkg/api/private
- internal/central/pkg/api/admin/private
- pkg/client/redhatsso/api
- emailsender/pkg/client/openapi
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
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/rhel9/go-toolset:1.24.6 /usr/lib/golang /usr/lib/golang
COPY --from=registry.redhat.io/ubi9/go-toolset:1.25 /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.4.0
rev: v2.8.0
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 @@ -152,7 +152,7 @@ The codebase follows a dependency injection pattern using the `goava/di` framewo
## Development Workflow

### Environment Setup
1. Install prerequisites: Go 1.24+, Docker, Node.js, Java, OCM CLI
1. Install prerequisites: Go 1.25+, 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: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi8/go-toolset:1.24.6-1756315360 AS build
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.25.3@sha256:e8938564f866174a6d79e55dfe577c2ed184b1f53e91d782173fb69b07ce69ef AS build

USER root
RUN mkdir /src /rds_ca
Expand Down Expand Up @@ -26,7 +26,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=cache,target=/go/.cache/ \
make fleet-manager fleetshard-sync GOOS=linux GOARCH=${TARGETARCH}

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1295 AS standard
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:90bd85dcd061d1ad6dbda70a867c41958c04a86462d05c631f8205e8870f28f8 AS standard

RUN microdnf install shadow-utils

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.24+](https://golang.org/dl/)
* [Golang 1.25+](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: 2 additions & 2 deletions emailsender/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.24.6-1756315360 AS build
FROM registry.access.redhat.com/ubi9/go-toolset:1.25.3@sha256:e8938564f866174a6d79e55dfe577c2ed184b1f53e91d782173fb69b07ce69ef AS build
USER root
ENV GOFLAGS="-mod=mod"

Expand All @@ -10,7 +10,7 @@ COPY . ./

RUN make emailsender

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1295 AS standard
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:90bd85dcd061d1ad6dbda70a867c41958c04a86462d05c631f8205e8870f28f8 AS standard

RUN microdnf install shadow-utils

Expand Down
4 changes: 2 additions & 2 deletions fleetshard-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi8/go-toolset:1.24.6-1756315360 AS build
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.25.3@sha256:e8938564f866174a6d79e55dfe577c2ed184b1f53e91d782173fb69b07ce69ef AS build
USER root

RUN mkdir /src
Expand All @@ -25,7 +25,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=cache,target=/go/.cache/ \
make fleetshard-operator GOOS=linux GOARCH=${TARGETARCH}

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1295
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:90bd85dcd061d1ad6dbda70a867c41958c04a86462d05c631f8205e8870f28f8

RUN microdnf install shadow-utils

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.24.6
go 1.25

require (
github.com/DATA-DOG/go-sqlmock v1.5.2
Expand Down
4 changes: 2 additions & 2 deletions probe/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi8/go-toolset:1.24.6-1756315360 AS build
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.25.3@sha256:e8938564f866174a6d79e55dfe577c2ed184b1f53e91d782173fb69b07ce69ef AS build
USER root
ENV GOFLAGS="-mod=mod"

Expand All @@ -12,7 +12,7 @@ ARG TARGETARCH

RUN make probe GOOS=linux GOARCH=${TARGETARCH}

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1295 as standard
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:90bd85dcd061d1ad6dbda70a867c41958c04a86462d05c631f8205e8870f28f8 as standard

RUN microdnf install shadow-utils

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.24.6
go 1.25

require (
github.com/matryer/moq v0.5.2
Expand Down
Loading