Skip to content
Open
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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN make install-backend

COPY cmd/ cmd/
COPY pkg/ pkg/
COPY internal/ internal/

ENV GOEXPERIMENT=strictfipsruntime
ENV CGO_ENABLED=1
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN go mod download

COPY cmd/ cmd/
COPY pkg/ pkg/
COPY internal/ internal/

RUN go build -mod=mod -o plugin-backend cmd/plugin-backend.go

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.dev-mcp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ RUN go mod download

COPY cmd/ cmd/
COPY pkg/ pkg/
COPY internal/ internal/

RUN go build -mod=mod -o plugin-backend cmd/plugin-backend.go

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.devspace
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN make install-backend
COPY config/ config/
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY internal/ internal/

RUN make build-backend

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.konflux
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN make install-backend

COPY cmd/ cmd/
COPY pkg/ pkg/
COPY internal/ internal/

ENV GOEXPERIMENT=strictfipsruntime
ENV CGO_ENABLED=1
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.mcp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN make install-backend

COPY cmd/ cmd/
COPY pkg/ pkg/
COPY internal/ internal/

ENV GOOS=${TARGETOS:-linux}
ENV GOARCH=${TARGETARCH}
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ start-backend:

.PHONY: test-backend
test-backend:
go test ./pkg/... -v
go test ./pkg/... ./internal/... -v

.PHONY: test-e2e
test-e2e:
PLUGIN_URL=http://localhost:9001 go test -v -timeout=150m -count=1 ./test/e2e

.PHONY: test-frontend
test-frontend:
Expand Down
68 changes: 40 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,67 +1,79 @@
module github.com/openshift/monitoring-plugin

go 1.24.0
go 1.25.0
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod directive =="
rg -n '^go\s+[0-9]+\.[0-9]+' go.mod

echo
echo "== Go versions referenced by Dockerfiles =="
fd '^Dockerfile(\..+)?$' -t f | while read -r f; do
  echo "--- ${f}"
  rg -n 'openshift-golang-builder|golang_[0-9]+\.[0-9]+|go[0-9]+\.[0-9]+' "$f" || true
done

Repository: openshift/monitoring-plugin

Length of output: 914


Align go.mod toolchain with builder images before merge.

go.mod line 3 specifies Go 1.25.0, but Dockerfiles (Dockerfile.dev, Dockerfile.dev-mcp, Dockerfile.devspace, Dockerfile.konflux, Dockerfile.mcp) all reference openshift-golang-builder:rhel_9_golang_1.24 or rhel_9_1.24. This version mismatch will cause build failures in CI and dev containers.

Either bump all builder images to Go 1.25 or revert the go directive in go.mod to 1.24.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 3, go.mod currently declares "go 1.25.0" which mismatches the
project builder images referencing Go 1.24; update either the builder images to
use Go 1.25 or revert the go directive in go.mod to 1.24 so CI and dev
containers use the same toolchain. Locate the go directive in go.mod ("go
1.25.0") and change it to "go 1.24" to match the Dockerfiles (or update the
Dockerfiles to use openshift-golang-builder with 1.25 consistently), then run go
mod tidy and verify builds locally to ensure the change resolves the mismatch.


require (
github.com/evanphx/json-patch v4.12.0+incompatible
github.com/gorilla/handlers v1.5.2
github.com/gorilla/mux v1.8.1
github.com/onsi/ginkgo/v2 v2.27.2
github.com/onsi/gomega v1.38.2
github.com/openshift/api v0.0.0-20251122153900-88cca31a44c9
github.com/openshift/client-go v0.0.0-20251123231646-4685125c2287
github.com/openshift/library-go v0.0.0-20240905123346-5bdbfe35a6f5
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.87.0
github.com/prometheus-operator/prometheus-operator/pkg/client v0.87.0
github.com/sirupsen/logrus v1.9.3
github.com/prometheus/common v0.67.5
github.com/prometheus/prometheus v0.310.0
github.com/sirupsen/logrus v1.9.4
github.com/stretchr/testify v1.11.1
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.34.2
k8s.io/apimachinery v0.34.2
k8s.io/api v0.35.0
k8s.io/apimachinery v0.35.0
k8s.io/apiserver v0.34.2
k8s.io/client-go v0.34.2
k8s.io/client-go v0.35.0
)

require (
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-openapi/jsonpointer v0.22.1 // indirect
github.com/go-openapi/jsonreference v0.21.2 // indirect
github.com/go-openapi/swag v0.25.1 // indirect
github.com/go-openapi/swag/cmdutils v0.25.1 // indirect
github.com/go-openapi/swag/conv v0.25.1 // indirect
github.com/go-openapi/swag/fileutils v0.25.1 // indirect
github.com/go-openapi/swag/jsonname v0.25.1 // indirect
github.com/go-openapi/swag/jsonutils v0.25.1 // indirect
github.com/go-openapi/swag/loading v0.25.1 // indirect
github.com/go-openapi/swag/mangling v0.25.1 // indirect
github.com/go-openapi/swag/netutils v0.25.1 // indirect
github.com/go-openapi/swag/stringutils v0.25.1 // indirect
github.com/go-openapi/swag/typeutils v0.25.1 // indirect
github.com/go-openapi/swag/yamlutils v0.25.1 // indirect
github.com/go-openapi/jsonpointer v0.22.4 // indirect
github.com/go-openapi/jsonreference v0.21.4 // indirect
github.com/go-openapi/swag v0.25.4 // indirect
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
github.com/go-openapi/swag/conv v0.25.4 // indirect
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
github.com/go-openapi/swag/jsonutils v0.25.4 // indirect
github.com/go-openapi/swag/loading v0.25.4 // indirect
github.com/go-openapi/swag/mangling v0.25.4 // indirect
github.com/go-openapi/swag/netutils v0.25.4 // indirect
github.com/go-openapi/swag/stringutils v0.25.4 // indirect
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 // indirect
github.com/google/pprof v0.0.0-20260202012954-cb029daf43ef // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/openshift/api v0.0.0-20251122153900-88cca31a44c9 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.46.0 // indirect
golang.org/x/oauth2 v0.32.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/term v0.36.0 // indirect
golang.org/x/text v0.30.0 // indirect
golang.org/x/time v0.13.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/term v0.39.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.41.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading