diff --git a/.go-version b/.go-version index 88ebadf2c322..7bf9455f08c9 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.19.10 +1.20.5 diff --git a/.golangci.yml b/.golangci.yml index 793f4a05866a..867324d3d99a 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -109,7 +109,7 @@ linters-settings: gosimple: # Select the Go version to target. The default is '1.13'. - go: "1.19.10" + go: "1.20.5" nakedret: # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 @@ -127,19 +127,19 @@ linters-settings: staticcheck: # Select the Go version to target. The default is '1.13'. - go: "1.19.10" + go: "1.20.5" checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.19.10" + go: "1.20.5" # Disabled: # ST1005: error strings should not be capitalized checks: ["all", "-ST1005"] unused: # Select the Go version to target. The default is '1.13'. - go: "1.19.10" + go: "1.20.5" gosec: excludes: @@ -162,4 +162,3 @@ linters-settings: # Report pre-allocation suggestions on for loops. # Default: false for-loops: true - \ No newline at end of file diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 9b73587ea877..a3606a99241b 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -11,6 +11,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] *Affecting all Beats* - Update Go version to 1.19.10 {pull}35751[35751] - Fix status reporting to Elastic-Agent when output configuration is invalid running under Elastic-Agent {pull}35719[35719] +- Upgrade Go to 1.20.5 *Auditbeat* diff --git a/auditbeat/Dockerfile b/auditbeat/Dockerfile index d410055f8d55..41c59fa469d5 100644 --- a/auditbeat/Dockerfile +++ b/auditbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.5 RUN \ apt-get update \ @@ -11,7 +11,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts -# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668. +# with the system Python installation. golang:1.20.5 uses Debian 12 which now enforces PEP668. ENV VIRTUAL_ENV=/opt/venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" diff --git a/dev-tools/kubernetes/filebeat/Dockerfile.debug b/dev-tools/kubernetes/filebeat/Dockerfile.debug index 96458cbffbeb..92b303af6009 100644 --- a/dev-tools/kubernetes/filebeat/Dockerfile.debug +++ b/dev-tools/kubernetes/filebeat/Dockerfile.debug @@ -1,4 +1,4 @@ -FROM golang:1.19.10 as builder +FROM golang:1.20.5 as builder ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin diff --git a/dev-tools/kubernetes/heartbeat/Dockerfile.debug b/dev-tools/kubernetes/heartbeat/Dockerfile.debug index bacfa95ca35e..23ee8b1f71a3 100644 --- a/dev-tools/kubernetes/heartbeat/Dockerfile.debug +++ b/dev-tools/kubernetes/heartbeat/Dockerfile.debug @@ -1,4 +1,4 @@ -FROM golang:1.19.10 as builder +FROM golang:1.20.5 as builder ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin diff --git a/dev-tools/kubernetes/metricbeat/Dockerfile.debug b/dev-tools/kubernetes/metricbeat/Dockerfile.debug index da68b4fb5d14..601aa7b9f2b1 100644 --- a/dev-tools/kubernetes/metricbeat/Dockerfile.debug +++ b/dev-tools/kubernetes/metricbeat/Dockerfile.debug @@ -1,4 +1,4 @@ -FROM golang:1.19.10 as builder +FROM golang:1.20.5 as builder ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin diff --git a/heartbeat/Dockerfile b/heartbeat/Dockerfile index 4f0639839989..fddae9ad7719 100644 --- a/heartbeat/Dockerfile +++ b/heartbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.5 RUN \ apt-get update \ @@ -10,7 +10,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts -# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668. +# with the system Python installation. golang:1.20.5 uses Debian 12 which now enforces PEP668. ENV VIRTUAL_ENV=/opt/venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" diff --git a/libbeat/docs/version.asciidoc b/libbeat/docs/version.asciidoc index a73f993a2833..ac1a00e6e8bb 100644 --- a/libbeat/docs/version.asciidoc +++ b/libbeat/docs/version.asciidoc @@ -1,6 +1,6 @@ :stack-version: 8.9.0 :doc-branch: master -:go-version: 1.19.10 +:go-version: 1.20.5 :release-state: unreleased :python: 3.7 :docker: 1.12 diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile index e7ebcc933710..99219a1dbc26 100644 --- a/metricbeat/Dockerfile +++ b/metricbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.5 RUN \ apt update \ @@ -13,7 +13,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts -# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668. +# with the system Python installation. golang:1.20.5 uses Debian 12 which now enforces PEP668. ENV VIRTUAL_ENV=/opt/venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" diff --git a/metricbeat/module/http/_meta/Dockerfile b/metricbeat/module/http/_meta/Dockerfile index 8565b542b1af..0a788a605a99 100644 --- a/metricbeat/module/http/_meta/Dockerfile +++ b/metricbeat/module/http/_meta/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.5 COPY test/main.go main.go diff --git a/metricbeat/module/nats/_meta/Dockerfile b/metricbeat/module/nats/_meta/Dockerfile index bbc62eaa888f..20c7a9ca1033 100644 --- a/metricbeat/module/nats/_meta/Dockerfile +++ b/metricbeat/module/nats/_meta/Dockerfile @@ -2,7 +2,7 @@ ARG NATS_VERSION=2.0.4 FROM nats:$NATS_VERSION # build stage -FROM golang:1.19.10 AS build-env +FROM golang:1.20.5 AS build-env RUN apt-get install git mercurial gcc RUN git clone https://github.com/nats-io/nats.go.git /nats-go RUN cd /nats-go/examples/nats-bench && git checkout tags/v1.10.0 && go build . diff --git a/packetbeat/Dockerfile b/packetbeat/Dockerfile index 4d6e1f522e08..ff8c0a4f526d 100644 --- a/packetbeat/Dockerfile +++ b/packetbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.5 RUN \ apt-get update \ @@ -12,7 +12,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts -# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668. +# with the system Python installation. golang:1.20.5 uses Debian 12 which now enforces PEP668. ENV VIRTUAL_ENV=/opt/venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" diff --git a/x-pack/functionbeat/Dockerfile b/x-pack/functionbeat/Dockerfile index 3d0953e88e18..c9147d376f0c 100644 --- a/x-pack/functionbeat/Dockerfile +++ b/x-pack/functionbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.5 RUN \ apt-get update \ @@ -11,7 +11,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Use a virtualenv to avoid the PEP668 "externally managed environment" error caused by conflicts -# with the system Python installation. golang:1.19.10 uses Debian 12 which now enforces PEP668. +# with the system Python installation. golang:1.20.5 uses Debian 12 which now enforces PEP668. ENV VIRTUAL_ENV=/opt/venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" diff --git a/x-pack/metricbeat/module/stan/_meta/Dockerfile b/x-pack/metricbeat/module/stan/_meta/Dockerfile index db00a41578f6..9ce3ca207685 100644 --- a/x-pack/metricbeat/module/stan/_meta/Dockerfile +++ b/x-pack/metricbeat/module/stan/_meta/Dockerfile @@ -2,7 +2,7 @@ ARG STAN_VERSION=0.15.1 FROM nats-streaming:$STAN_VERSION # build stage -FROM golang:1.19.10 AS build-env +FROM golang:1.20.5 AS build-env RUN apt-get install git mercurial gcc RUN git clone https://github.com/nats-io/stan.go.git /stan-go RUN cd /stan-go/examples/stan-bench && git checkout tags/v0.5.2 && go build .