From 40c9a5a5df7cf89e7d7e08f4c541c563fd9e5366 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:39:48 -0400 Subject: [PATCH] [Automation][7.17] Bump Golang version to 1.21.12 (#40113) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Update Filebeat Dockerfile Made with ❤️️ by updatecli * chore: Update Functionbeat Dockerfile Made with ❤️️ by updatecli * chore: Update from vsphere Dockerfile Made with ❤️️ by updatecli * chore: Update Filebeat debug Dockerfile Made with ❤️️ by updatecli * chore: Update version.asciidoc Made with ❤️️ by updatecli * chore: Update HTTP module Dockerfile Made with ❤️️ by updatecli * chore: Update x-pack/libbeat Dockerfile Made with ❤️️ by updatecli * chore: Update Metricbeat debug Dockerfile Made with ❤️️ by updatecli * chore: Update stan Dockerfile Made with ❤️️ by updatecli * chore: Update NATS module Dockerfile Made with ❤️️ by updatecli * chore: Update libbeat Dockerfile Made with ❤️️ by updatecli * chore: Update .golangci.yml Made with ❤️️ by updatecli * chore: Update Auditbeat Dockerfile Made with ❤️️ by updatecli * chore: Update Heartbeat Dockerfile Made with ❤️️ by updatecli * chore: Update .go-version Made with ❤️️ by updatecli * chore: Update Metricbeat Dockerfile Made with ❤️️ by updatecli * chore: Update Packetbeat Dockerfile Made with ❤️️ by updatecli * chore: Update Heartbeat debug Dockerfile Made with ❤️️ by updatecli * Update changelog. * Run mage fmt --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Craig MacKenzie --- .buildkite/pipeline-scheduler.py | 6 ++++-- .go-version | 2 +- .golangci.yml | 8 ++++---- CHANGELOG.next.asciidoc | 2 +- auditbeat/Dockerfile | 2 +- dev-tools/kubernetes/filebeat/Dockerfile.debug | 2 +- dev-tools/kubernetes/heartbeat/Dockerfile.debug | 2 +- dev-tools/kubernetes/metricbeat/Dockerfile.debug | 2 +- filebeat/Dockerfile | 2 +- heartbeat/Dockerfile | 2 +- libbeat/Dockerfile | 2 +- libbeat/docs/version.asciidoc | 2 +- metricbeat/Dockerfile | 2 +- metricbeat/module/http/_meta/Dockerfile | 2 +- metricbeat/module/nats/_meta/Dockerfile | 2 +- metricbeat/module/vsphere/_meta/Dockerfile | 2 +- packetbeat/Dockerfile | 2 +- .../elastic-agent/pkg/agent/control/cproto/control.pb.go | 5 +++-- .../pkg/agent/control/cproto/control_grpc.pb.go | 1 + x-pack/functionbeat/Dockerfile | 2 +- x-pack/libbeat/Dockerfile | 2 +- x-pack/metricbeat/module/stan/_meta/Dockerfile | 2 +- 22 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.buildkite/pipeline-scheduler.py b/.buildkite/pipeline-scheduler.py index 447ba5a74609..eb564a299182 100755 --- a/.buildkite/pipeline-scheduler.py +++ b/.buildkite/pipeline-scheduler.py @@ -73,7 +73,8 @@ def get_release_branches() -> typing.List[str]: try: release_branches = [branch for branch in resp["branches"]] except KeyError: - fail_with_error(f'''Didn't find the excepted structure ["branches"] in the response [{resp}] from [{ACTIVE_BRANCHES_URL}]''') + fail_with_error( + f'''Didn't find the excepted structure ["branches"] in the response [{resp}] from [{ACTIVE_BRANCHES_URL}]''') return release_branches @@ -103,7 +104,8 @@ def generate_pipeline(pipelines_to_trigger: typing.List[str], branches: typing.L target_branches = sorted(list(set(release_branches).difference(exclude_branches))) if len(target_branches) == 0 or target_branches[0].isspace(): - fail_with_error(f"Calculated target branches were empty! You passed EXCLUDE_BRANCHES={exclude_branches} and release branches are {release_branches} the difference of which results in {target_branches}.") + fail_with_error( + f"Calculated target branches were empty! You passed EXCLUDE_BRANCHES={exclude_branches} and release branches are {release_branches} the difference of which results in {target_branches}.") pipeline = generate_pipeline(pipelines_to_trigger, branches=target_branches) print('# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json') diff --git a/.go-version b/.go-version index 88863fd8e367..26d7b6e756e0 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.21.11 +1.21.12 diff --git a/.golangci.yml b/.golangci.yml index dbb8d7a128f4..f00d1496fa09 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -102,7 +102,7 @@ linters-settings: gosimple: # Select the Go version to target. The default is '1.13'. - go: "1.21.11" + go: "1.21.12" nakedret: # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 @@ -120,19 +120,19 @@ linters-settings: staticcheck: # Select the Go version to target. The default is '1.13'. - go: "1.21.11" + go: "1.21.12" checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.21.11" + go: "1.21.12" # 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.21.11" + go: "1.21.12" gosec: excludes: diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 338d5c18cb3b..be9b8ede3ccf 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -65,7 +65,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Affecting all Beats* -- Upgrade to Go 1.21.11. {pull}39832[39832] +- Upgrade to Go 1.21.12. {pull}40113[40113] *Auditbeat* diff --git a/auditbeat/Dockerfile b/auditbeat/Dockerfile index fdfbc6991478..910945115a38 100644 --- a/auditbeat/Dockerfile +++ b/auditbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 RUN \ apt-get update \ diff --git a/dev-tools/kubernetes/filebeat/Dockerfile.debug b/dev-tools/kubernetes/filebeat/Dockerfile.debug index de570e4624f4..6dd31c7b7b9c 100644 --- a/dev-tools/kubernetes/filebeat/Dockerfile.debug +++ b/dev-tools/kubernetes/filebeat/Dockerfile.debug @@ -1,4 +1,4 @@ -FROM golang:1.21.11 as builder +FROM golang:1.21.12 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 4820d67dc6d3..c843cd01e717 100644 --- a/dev-tools/kubernetes/heartbeat/Dockerfile.debug +++ b/dev-tools/kubernetes/heartbeat/Dockerfile.debug @@ -1,4 +1,4 @@ -FROM golang:1.21.11 as builder +FROM golang:1.21.12 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 438c3690dcd9..a2a867e79714 100644 --- a/dev-tools/kubernetes/metricbeat/Dockerfile.debug +++ b/dev-tools/kubernetes/metricbeat/Dockerfile.debug @@ -1,4 +1,4 @@ -FROM golang:1.21.11 as builder +FROM golang:1.21.12 as builder ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin diff --git a/filebeat/Dockerfile b/filebeat/Dockerfile index f003772a2e8d..6297f03d8e86 100644 --- a/filebeat/Dockerfile +++ b/filebeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 RUN \ apt-get update \ diff --git a/heartbeat/Dockerfile b/heartbeat/Dockerfile index 0a1e0501ab4f..ca0116f6e9dd 100644 --- a/heartbeat/Dockerfile +++ b/heartbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 RUN \ apt-get update \ diff --git a/libbeat/Dockerfile b/libbeat/Dockerfile index 3e09cc79f169..4784669d2508 100644 --- a/libbeat/Dockerfile +++ b/libbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 RUN \ apt-get update \ diff --git a/libbeat/docs/version.asciidoc b/libbeat/docs/version.asciidoc index 4715e636d4ec..da61339498be 100644 --- a/libbeat/docs/version.asciidoc +++ b/libbeat/docs/version.asciidoc @@ -1,6 +1,6 @@ :stack-version: 7.17.22 :doc-branch: 7.17 -:go-version: 1.21.11 +:go-version: 1.21.12 :release-state: unreleased :python: 3.7 :docker: 1.12 diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile index 554b9df0b60e..5ca4be5b9369 100644 --- a/metricbeat/Dockerfile +++ b/metricbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 COPY --from=docker:26.0.0-alpine3.19 /usr/local/bin/docker /usr/local/bin/ RUN \ diff --git a/metricbeat/module/http/_meta/Dockerfile b/metricbeat/module/http/_meta/Dockerfile index b6517fea093f..1c5adb9cf5bc 100644 --- a/metricbeat/module/http/_meta/Dockerfile +++ b/metricbeat/module/http/_meta/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 COPY test/main.go main.go diff --git a/metricbeat/module/nats/_meta/Dockerfile b/metricbeat/module/nats/_meta/Dockerfile index f443a51dd3ae..ea9a8b9ca535 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.21.11 AS build-env +FROM golang:1.21.12 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/metricbeat/module/vsphere/_meta/Dockerfile b/metricbeat/module/vsphere/_meta/Dockerfile index 6301d44f4e2a..db1b32f5967f 100644 --- a/metricbeat/module/vsphere/_meta/Dockerfile +++ b/metricbeat/module/vsphere/_meta/Dockerfile @@ -1,5 +1,5 @@ ARG VSPHERE_GOLANG_VERSION -FROM golang:1.21.11 +FROM golang:1.21.12 RUN apt-get install curl git RUN go install github.com/vmware/govmomi/vcsim@v0.30.4 diff --git a/packetbeat/Dockerfile b/packetbeat/Dockerfile index 22c50eeb4305..1e9ff2a10e63 100644 --- a/packetbeat/Dockerfile +++ b/packetbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 RUN \ apt-get update \ diff --git a/x-pack/elastic-agent/pkg/agent/control/cproto/control.pb.go b/x-pack/elastic-agent/pkg/agent/control/cproto/control.pb.go index 27954f187e52..57d981e90fc5 100644 --- a/x-pack/elastic-agent/pkg/agent/control/cproto/control.pb.go +++ b/x-pack/elastic-agent/pkg/agent/control/cproto/control.pb.go @@ -11,10 +11,11 @@ package cproto import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/x-pack/elastic-agent/pkg/agent/control/cproto/control_grpc.pb.go b/x-pack/elastic-agent/pkg/agent/control/cproto/control_grpc.pb.go index b6398da232cb..f97764d96db4 100644 --- a/x-pack/elastic-agent/pkg/agent/control/cproto/control_grpc.pb.go +++ b/x-pack/elastic-agent/pkg/agent/control/cproto/control_grpc.pb.go @@ -8,6 +8,7 @@ package cproto import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x-pack/functionbeat/Dockerfile b/x-pack/functionbeat/Dockerfile index d1c4d5af3cdf..ab993ab63bca 100644 --- a/x-pack/functionbeat/Dockerfile +++ b/x-pack/functionbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 RUN \ apt-get update \ diff --git a/x-pack/libbeat/Dockerfile b/x-pack/libbeat/Dockerfile index e09893cca6ab..9f8279eb12d7 100644 --- a/x-pack/libbeat/Dockerfile +++ b/x-pack/libbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.11 +FROM golang:1.21.12 RUN \ apt-get update \ diff --git a/x-pack/metricbeat/module/stan/_meta/Dockerfile b/x-pack/metricbeat/module/stan/_meta/Dockerfile index e7fd7774af83..583c2929ebcb 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.21.11 AS build-env +FROM golang:1.21.12 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 .