diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d011bbb835d57cbf1fb8a35f703a45b4eec03331..64df4b3bf7f374ead8a13cff225b26a56d079d41 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ['1.18','1.19'] + go: ['1.19','1.20'] steps: - uses: actions/checkout@v3 - name: Set up Go diff --git a/.github/workflows/pull_request_e2e.yml b/.github/workflows/pull_request_e2e.yml index d42a12a9bb4643e6db59c6297168176e58f89cc1..16fc97b892264aaaf3522781ef03bc285c5e7e6c 100644 --- a/.github/workflows/pull_request_e2e.yml +++ b/.github/workflows/pull_request_e2e.yml @@ -17,7 +17,7 @@ jobs: - name: set up go 1.x uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: '1.20' - name: checkout uses: actions/checkout@v3 - name: run end-to-end tests diff --git a/.github/workflows/push_image.yml b/.github/workflows/push_image.yml index 7bd2cb16917f6e21282085c7521f23b9dd05e2a3..c4cf2dfd936946d754d1e99c97930bc4afeb6029 100644 --- a/.github/workflows/push_image.yml +++ b/.github/workflows/push_image.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ['1.19'] + go: ['1.20'] steps: - name: install make run: sudo apt-get install make diff --git a/.github/workflows/push_image_pr.yml b/.github/workflows/push_image_pr.yml index f670434aa44873a98044a2df8893ae7f89126168..3225fe01d06815ba76e8a5a025cf1b0bf4a8b159 100644 --- a/.github/workflows/push_image_pr.yml +++ b/.github/workflows/push_image_pr.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ['1.19'] + go: ['1.20'] steps: - name: install make run: sudo apt-get install make diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d7f4b82b2efcf56a8dd13af19fe8fa620f54fbc..d0fd17c511624040e3f822c8dc51ecc71ac67ffa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ['1.19'] + go: ['1.20'] steps: - name: checkout uses: actions/checkout@v3 diff --git a/.golangci.yml b/.golangci.yml index 6f8b98977879ab757c124eba33f4c2258014dad7..dacbd203b2ef936b3c2425f46aee139e196e594e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,5 @@ linters: enable: - - deadcode - errcheck - errorlint - cyclop @@ -8,20 +7,18 @@ linters: - exhaustive - exportloopref - gocritic - - goimports + - gofmt - gosimple - govet - ineffassign - revive - staticcheck - - structcheck - stylecheck - typecheck - unused - - varcheck linters-settings: stylecheck: - go: "1.19" + go: "1.20" gocritic: enabled-checks: - hugeParam @@ -31,4 +28,3 @@ linters-settings: - deprecatedComment cyclop: max-complexity: 20 - diff --git a/Dockerfile b/Dockerfile index a9b20c7ad78b95cdc367a39b6037d62c26c058ad..299577e8552c64022247418afd3f7444a39b7fe6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG BUILDPLATFORM=linux/amd64 ARG TARGETARCH=amd64 # Build the manager binary -FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.19 as builder +FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.20 as builder ARG TARGETARCH ARG TARGETPLATFORM diff --git a/Makefile b/Makefile index dea367bf07755100542621e576e1678b2676560a..b11fa111f53ce17917f7bb81ce6d71ea56c11f67 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ OCI_BIN ?= $(shell basename ${OCI_BIN_PATH}) LOCAL_GENERATOR_IMAGE ?= ebpf-generator:latest CILIUM_EBPF_VERSION := v0.11.0 -GOLANGCI_LINT_VERSION = v1.50.1 +GOLANGCI_LINT_VERSION = v1.53.3 CLANG ?= clang CFLAGS := -O2 -g -Wall -Werror $(CFLAGS) GOOS ?= linux @@ -89,7 +89,7 @@ vendors: ## Check go vendors .PHONY: prereqs prereqs: ## Check if prerequisites are met, and install missing dependencies @echo "### Checking if prerequisites are met, and installing missing dependencies" - test -f $(shell go env GOPATH)/bin/golangci-lint || GOFLAGS="" go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} + GOFLAGS="" go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} test -f $(shell go env GOPATH)/bin/bpf2go || go install github.com/cilium/ebpf/cmd/bpf2go@${CILIUM_EBPF_VERSION} test -f $(shell go env GOPATH)/bin/protoc-gen-go || go install google.golang.org/protobuf/cmd/protoc-gen-go@latest test -f $(shell go env GOPATH)/bin/protoc-gen-go-grpc || go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest diff --git a/examples/performance/Dockerfile_packet_counter b/examples/performance/Dockerfile_packet_counter index 5e8863b58b6e478c225f44f8fe4d821e2a5e0560..0b44bcba5e757f6a7d09e60a8c6c642f596ec2c4 100644 --- a/examples/performance/Dockerfile_packet_counter +++ b/examples/performance/Dockerfile_packet_counter @@ -1,6 +1,6 @@ # this file has to be built from the project root directory -FROM golang:1.18 as builder +FROM golang:1.20 as builder WORKDIR /app diff --git a/go.mod b/go.mod index 520b1b66a3e41a8b4d81c27cc066ef0e8b60514c..9411ece3db79a33ebbf967e61b496eeadccce3ca 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/netobserv/netobserv-ebpf-agent -go 1.18 +go 1.19 require ( github.com/caarlos0/env/v6 v6.9.1 diff --git a/scripts/generators.Dockerfile b/scripts/generators.Dockerfile index c48833c756dc7b5332543ce6d99f8671910ad13e..df6d3ce7fed4a5bd3cb0f2f376c3eeeceebf31ae 100644 --- a/scripts/generators.Dockerfile +++ b/scripts/generators.Dockerfile @@ -1,6 +1,6 @@ FROM fedora:35 -ARG GOVERSION="1.18.4" +ARG GOVERSION="1.20.5" ARG PROTOCVERSION="3.19.4" # Installs dependencies that are required to compile eBPF programs