From 5c71c8a7f6e2d3d4d8d766fb5b1d6da1cd31109c Mon Sep 17 00:00:00 2001 From: Moritz Clasmeier Date: Fri, 15 May 2026 09:29:36 +0200 Subject: [PATCH 1/5] Bump go to 1.26 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 03e0c77a..b1b60748 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/stackrox/roxie -go 1.25.6 +go 1.26 require ( dario.cat/mergo v1.0.2 From 007eb5c836442381f9f13f8a374920c7a62a2f92 Mon Sep 17 00:00:00 2001 From: Moritz Clasmeier Date: Wed, 13 May 2026 22:28:24 +0200 Subject: [PATCH 2/5] Bump golangci-lint for Go 1.26 --- .github/workflows/code-quality.yml | 7 ++++--- .golangci.yml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index ed8bc099..be1427db 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -21,9 +21,10 @@ jobs: go-version-file: 'go.mod' cache: true - - name: Install golangci-lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0 + - name: golangci-lint + uses: golangci/golangci-lint-action@v9 + with: + version: v2.12.2 - name: Check formatting run: | diff --git a/.golangci.yml b/.golangci.yml index dbab8885..8330b89c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ # golangci-lint configuration for roxie -version: 2 +version: "2" run: timeout: 5m @@ -15,6 +15,10 @@ linters: - ineffassign # Detect ineffectual assignments - misspell # Find commonly misspelled words + settings: + staticcheck: + checks: ["all", "-SA4009", "-ST1000", "-ST1003", "-ST1020"] + # Disable noisy linters disable: - errcheck # Too many false positives for cleanup code @@ -22,16 +26,12 @@ linters: - revive # Style linter is too opinionated - unparam # Often flags valid parameter flexibility -linters-settings: - staticcheck: - checks: ["all", "-SA4009"] # Disable "argument is overwritten" check - issues: # Don't limit the number of issues max-issues-per-linter: 0 max-same-issues: 0 output: - print-issued-lines: true - print-linter-name: true - sort-results: true + formats: + text: + path: stdout From 00c19232a66fabd16ebc97aa4d3df6bc3c76d420 Mon Sep 17 00:00:00 2001 From: Moritz Clasmeier Date: Wed, 13 May 2026 22:45:29 +0200 Subject: [PATCH 3/5] Bump setup-go --- .github/workflows/code-quality.yml | 2 +- internal/deployer/operator.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index be1427db..07f3d8ba 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version-file: 'go.mod' cache: true diff --git a/internal/deployer/operator.go b/internal/deployer/operator.go index 8f451c4a..3f25a364 100644 --- a/internal/deployer/operator.go +++ b/internal/deployer/operator.go @@ -296,7 +296,8 @@ func (d *Deployer) removeKonfluxImageRewriting(ctx context.Context) error { d.logger.Dim("Removing Konflux ImageContentSourcePolicy if present...") _, err := d.runKubectl(ctx, k8s.KubectlOptions{ - Args: []string{"delete", "imagecontentsourcepolicy", "acs-konflux-builds", "--ignore-not-found=true"}, + Args: []string{"delete", "imagecontentsourcepolicy", "acs-konflux-builds", "--ignore-not-found=true"}, + IgnoreErrors: true, }) if err != nil { return fmt.Errorf("failed to delete ImageContentSourcePolicy: %w", err) From a0aee82e49a9e006b5026e01f8b3ec4cc54e740b Mon Sep 17 00:00:00 2001 From: Moritz Clasmeier Date: Wed, 13 May 2026 22:57:14 +0200 Subject: [PATCH 4/5] GOTOOLCHAIN=auto --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 2c40af0e..a26c41c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ ARG TARGETARCH WORKDIR /build USER root +ENV GOTOOLCHAIN=auto # Copy go mod files first for better layer caching COPY go.mod go.sum ./ From 56409afb49b55a95a8b3cd8ec9d5d91b2c47ae09 Mon Sep 17 00:00:00 2001 From: Moritz Clasmeier Date: Fri, 15 May 2026 11:47:25 +0200 Subject: [PATCH 5/5] Remove accidentally commited IgnoreErrors:true --- internal/deployer/operator.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/deployer/operator.go b/internal/deployer/operator.go index 3f25a364..8f451c4a 100644 --- a/internal/deployer/operator.go +++ b/internal/deployer/operator.go @@ -296,8 +296,7 @@ func (d *Deployer) removeKonfluxImageRewriting(ctx context.Context) error { d.logger.Dim("Removing Konflux ImageContentSourcePolicy if present...") _, err := d.runKubectl(ctx, k8s.KubectlOptions{ - Args: []string{"delete", "imagecontentsourcepolicy", "acs-konflux-builds", "--ignore-not-found=true"}, - IgnoreErrors: true, + Args: []string{"delete", "imagecontentsourcepolicy", "acs-konflux-builds", "--ignore-not-found=true"}, }) if err != nil { return fmt.Errorf("failed to delete ImageContentSourcePolicy: %w", err)