Skip to content

Commit 7856686

Browse files
mergify[bot]kruskallAndersonQdliappispierrehilbert
authored
[8.16](backport #42705) feat: bump go version to 1.23 (#43009)
* feat: bump go version to 1.23 (#42705) * feat: bump go version to 1.23 * Update CHANGELOG.next.asciidoc * Update packaging.sh * Update packaging.sh * use the aarch image instead of the alias * we don't use qemu on ARM64 * fix packaging --------- Co-authored-by: Julien Lind <[email protected]> Co-authored-by: Victor Martinez <[email protected]> (cherry picked from commit eafca95) # Conflicts: # libbeat/docs/version.asciidoc * Update version.asciidoc * fix changelog * fix changelog --------- Co-authored-by: kruskall <[email protected]> Co-authored-by: Anderson Queiroz <[email protected]> Co-authored-by: Dimitrios Liappis <[email protected]> Co-authored-by: Pierre HILBERT <[email protected]>
1 parent 5132559 commit 7856686

File tree

21 files changed

+41
-35
lines changed

21 files changed

+41
-35
lines changed

.buildkite/metricbeat/pipeline.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ steps:
146146

147147
- label: ":ubuntu: Metricbeat: Crosscompile"
148148
key: "mandatory-cross-compile"
149-
command: "make -C metricbeat crosscompile"
149+
command: |
150+
source .buildkite/scripts/qemu.sh
151+
make -C metricbeat crosscompile
150152
retry:
151153
automatic:
152154
- limit: 1
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
#!/usr/bin/env bash
22
#
33
# Centralise the mage package for a given beat in Buildkite.
4-
# It enables multi-arch builds to avoid the exec format errors when
5-
# attempting to build arm64 inside arm64 workers.
6-
# For further details, see https://github.com/elastic/elastic-agent/pull/6948
7-
# and https://github.com/elastic/golang-crossbuild/pull/507
84
#
95

106
set -ueo pipefail
117

12-
138
BEAT_DIR=${1:?-"Error: Beat directory must be specified."}
149

15-
#Use newer multiarch support for packaging
16-
docker run --privileged --rm tonistiigi/binfmt:master --install all
10+
# shellcheck source=/dev/null
11+
source .buildkite/scripts/qemu.sh
1712

1813
cd $BEAT_DIR
1914
mage package

.buildkite/scripts/qemu.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
#
3+
# It enables multi-arch builds to avoid the exec format errors when
4+
# attempting to build arm64 inside arm64 workers.
5+
#
6+
# For further details, see https://github.com/elastic/elastic-agent/pull/6948
7+
# and https://github.com/elastic/golang-crossbuild/pull/507
8+
#
9+
set -euo pipefail
10+
11+
if [[ "$(uname -m)" == "aarch64" || "$(uname -m)" == "arm64" ]]; then
12+
echo "Skipping qemu installation on arm64 worker"
13+
else
14+
BINFMT_IMAGE="tonistiigi/binfmt:qemu-v9.2.2"
15+
16+
# Make sure to uninstall first to avoid conflicts
17+
docker run --privileged --rm "$BINFMT_IMAGE" --uninstall qemu-*
18+
docker run --privileged --rm "$BINFMT_IMAGE" --install all
19+
fi

.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ steps:
6464
- label: ":ubuntu: x-pack/dockerlogbeat: Ubuntu x86_64 Unit Tests"
6565
key: "mandatory-linux-unit-test"
6666
command: |
67+
source .buildkite/scripts/qemu.sh
6768
cd x-pack/dockerlogbeat
6869
mage build unitTest
6970
retry:

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.22.12
1+
1.23.6

.golangci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,6 @@ linters-settings:
150150
- github.com/meraki/dashboard-api-go/v3
151151
- github.com/snowflakedb/gosnowflake
152152

153-
gosimple:
154-
# Select the Go version to target. The default is '1.13'.
155-
go: "1.22.12"
156-
157153
nakedret:
158154
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
159155
max-func-lines: 0
@@ -169,21 +165,13 @@ linters-settings:
169165
require-specific: false
170166

171167
staticcheck:
172-
# Select the Go version to target. The default is '1.13'.
173-
go: "1.22.12"
174168
checks: ["all"]
175169

176170
stylecheck:
177-
# Select the Go version to target. The default is '1.13'.
178-
go: "1.22.12"
179171
# Disabled:
180172
# ST1005: error strings should not be capitalized
181173
checks: ["all", "-ST1005"]
182174

183-
unused:
184-
# Select the Go version to target. The default is '1.13'.
185-
go: "1.22.12"
186-
187175
gosec:
188176
excludes:
189177
- G306 # Expect WriteFile permissions to be 0600 or less

CHANGELOG.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
176176
- elasticsearch output now supports `idle_connection_timeout`. {issue}35616[35615] {pull}36843[36843]
177177
- Enable early event encoding in the Elasticsearch output, improving cpu and memory use {pull}38572[38572]
178178
- The environment variable `BEATS_ADD_CLOUD_METADATA_PROVIDERS` overrides configured/default `add_cloud_metadata` providers {pull}38669[38669]
179+
- Update to Go 1.23.6. {pull}42705[42705]
179180

180181
*Auditbeat*
181182

auditbeat/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22.12
1+
FROM golang:1.23.6
22

33
RUN \
44
apt-get update \

dev-tools/kubernetes/filebeat/Dockerfile.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22.12 as builder
1+
FROM golang:1.23.6 as builder
22

33
ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin
44

dev-tools/kubernetes/heartbeat/Dockerfile.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22.12 as builder
1+
FROM golang:1.23.6 as builder
22

33
ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin
44

0 commit comments

Comments
 (0)