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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 1 addition & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,21 @@ jobs:
build-test-backend:
name: Build, lint, test backend
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.23']

steps:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
go-version: '1.24'
- name: checkout
uses: actions/checkout@v3
- name: build, lint, test
run: make backend && git diff --exit-code
- name: check clean vendors
run: go mod vendor
- name: Report coverage
if: ${{ matrix.go == '1.23' }}
uses: codecov/codecov-action@v4
with:
files: ./cover.out
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/push_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ jobs:
push-image:
name: push image
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.23']
steps:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
go-version: '1.24'
- name: checkout
uses: actions/checkout@v3
- name: docker login to quay.io
Expand All @@ -47,16 +44,13 @@ jobs:
codecov-back:
name: Codecov backend upload
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.23']
steps:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
go-version: '1.24'
- name: checkout
uses: actions/checkout@v3
- name: Test
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/push_image_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ jobs:
if: ${{ github.event.label.name == 'ok-to-test' }}
name: push PR image
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.23']
steps:
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
go-version: '1.24'
- name: checkout
uses: actions/checkout@v3
with:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
push-image:
name: push image
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.23']
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -34,7 +31,7 @@ jobs:
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
go-version: '1.24'
- name: docker login to quay.io
uses: docker/login-action@v2
with:
Expand Down
69 changes: 48 additions & 21 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,59 @@
version: "2"
run:
go: "1.23"
linters:
enable:
- errcheck
- errorlint
- copyloopvar
- cyclop
- errcheck
- errname
- errorlint
- exhaustive
- copyloopvar
- gocritic
- gofmt
- gosimple
- govet
- ineffassign
- revive
- staticcheck
- stylecheck
- typecheck
- unused
run:
go: "1.22"
linters-settings:
gocritic:
enabled-checks:
- hugeParam
- rangeExprCopy
- rangeValCopy
- indexAlloc
settings:
ifElseChain:
minThreshold: 3
cyclop:
max-complexity: 20
settings:
cyclop:
max-complexity: 20
gocritic:
enabled-checks:
- hugeParam
- rangeExprCopy
- rangeValCopy
- indexAlloc
settings:
ifElseChain:
minThreshold: 3
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
rules:
- linters:
- staticcheck
text: "QF1003:"
- linters:
- staticcheck
text: "QF1008:"
- linters:
- revive
text: "avoid meaningless package names"
formatters:
enable:
- gofmt
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM localhost/local-front-build:latest as web-builder

ARG TARGETARCH
FROM docker.io/library/golang:1.23 as go-builder
FROM docker.io/library/golang:1.24 as go-builder

ARG TARGETARCH=amd64
ARG LDFLAGS
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/golang:1.23
FROM docker.io/library/golang:1.24

RUN apt-get update && apt-get install -y \
nodejs \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.cypress
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WORKDIR /opt/app-root/web
RUN npm run format-all
RUN npm run build$BUILDSCRIPT

FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.23 as go-builder
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.24 as go-builder

ARG LDFLAGS
WORKDIR /opt/app-root
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.downstream
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ WORKDIR /opt/app-root/web
RUN npm run format-all
RUN npm run build

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as go-builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24 as go-builder

ARG BUILDVERSION

Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ifneq ($(CLEAN_BUILD),)
LDFLAGS ?= -X 'main.buildVersion=${VERSION}-${BUILD_SHA}' -X 'main.buildDate=${BUILD_DATE}'
endif

GOLANGCI_LINT_VERSION = v1.61.0
GOLANGCI_LINT_VERSION = v2.2.1
NPM_INSTALL ?= install
CMDLINE_ARGS ?= --loglevel trace --config config/config.yaml

Expand Down Expand Up @@ -88,7 +88,9 @@ help: ## Display this help.
.PHONY: prereqs
prereqs: ## Test if prerequisites are met, and installing missing dependencies
@echo "### Test if prerequisites are met, and installing missing dependencies"
GOFLAGS="" go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
test -f ./bin/golangci-lint-${GOLANGCI_LINT_VERSION} || ( \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s ${GOLANGCI_LINT_VERSION} \
&& mv ./bin/golangci-lint ./bin/golangci-lint-${GOLANGCI_LINT_VERSION})

.PHONY: vendors
vendors: ## Check go vendors
Expand Down Expand Up @@ -177,7 +179,7 @@ fmt-backend: ## Run backend go fmt
.PHONY: lint-backend
lint-backend: prereqs ## Lint backend code
@echo "### Linting backend code"
golangci-lint run ./...
./bin/golangci-lint-${GOLANGCI_LINT_VERSION} run ./...

.PHONY: test-backend
test-backend: ## Test backend using go test
Expand Down
12 changes: 5 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/netobserv/network-observability-console-plugin

go 1.23.0
go 1.24.0

toolchain go1.23.5
toolchain go1.24.4

require (
github.com/gorilla/mux v1.8.1
Expand All @@ -14,9 +14,9 @@ require (
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.10.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.32.3
k8s.io/apimachinery v0.32.3
k8s.io/client-go v0.32.3
k8s.io/api v0.33.2
k8s.io/apimachinery v0.33.2
k8s.io/client-go v0.33.2
)

require (
Expand All @@ -30,10 +30,8 @@ require (
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
Expand Down
20 changes: 8 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,12 @@ github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIx
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
Expand Down Expand Up @@ -114,8 +110,8 @@ github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2
github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/safchain/ethtool v0.5.10 h1:Im294gZtuf4pSGJRAOGKaASNi3wMeFaGaWuSaomedpc=
Expand Down Expand Up @@ -217,12 +213,12 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls=
k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k=
k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U=
k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU=
k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY=
k8s.io/api v0.33.2 h1:YgwIS5jKfA+BZg//OQhkJNIfie/kmRsO0BmNaVSimvY=
k8s.io/api v0.33.2/go.mod h1:fhrbphQJSM2cXzCWgqU29xLDuks4mu7ti9vveEnpSXs=
k8s.io/apimachinery v0.33.2 h1:IHFVhqg59mb8PJWTLi8m1mAoepkUNYmptHsV+Z1m5jY=
k8s.io/apimachinery v0.33.2/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/client-go v0.33.2 h1:z8CIcc0P581x/J1ZYf4CNzRKxRvQAwoAolYPbtQes+E=
k8s.io/client-go v0.33.2/go.mod h1:9mCgT4wROvL948w6f6ArJNb7yQd7QsvqavDeZHvNmHo=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/filters/logql.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,13 @@ func moreThanRegex(sb *strings.Builder, value string) {

if i > 1 {
sb.WriteString("{")
sb.WriteString(fmt.Sprintf("%d", i))
fmt.Fprintf(sb, "%d", i)
sb.WriteString(",}")
}
}

sb.WriteString("|[1-9][0-9]{")
sb.WriteString(fmt.Sprintf("%d", len(value)))
fmt.Fprintf(sb, "%d", len(value))
sb.WriteString(",})")
}

Expand Down
3 changes: 0 additions & 3 deletions vendor/github.com/golang/protobuf/AUTHORS

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/golang/protobuf/CONTRIBUTORS

This file was deleted.

28 changes: 0 additions & 28 deletions vendor/github.com/golang/protobuf/LICENSE

This file was deleted.

Loading