Skip to content

Commit 0081ff4

Browse files
[9.3](backport #50644) Update go to 1.26.3 (#50842)
* Fix go vet errors and remove unnecessary code * [libbeat] Update TestGetUrl so all tested URLs are valid * Revert #50686 now that only Go 1.26 is supported (cherry picked from commit 51e7321) # Conflicts: # libbeat/docs/version.asciidoc Assisted-By: Cursor, Model: Composer --------- Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
1 parent cd8b441 commit 0081ff4

21 files changed

Lines changed: 72 additions & 63 deletions

File tree

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.25.9
1+
1.26.3

auditbeat/Dockerfile

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

33
RUN \
44
apt-get update \
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# REQUIRED
2+
# Kind can be one of:
3+
# - breaking-change: a change to previously-documented behavior
4+
# - deprecation: functionality that is being removed in a later release
5+
# - bug-fix: fixes a problem in a previous version
6+
# - enhancement: extends functionality but does not break or fix existing behavior
7+
# - feature: new functionality
8+
# - known-issue: problems that we are aware of in a given version
9+
# - security: impacts on the security of a product or a user’s deployment.
10+
# - upgrade: important information for someone upgrading from a prior version
11+
# - other: does not fit into any of the other categories
12+
kind: feature
13+
14+
# REQUIRED for all kinds
15+
# Change summary; a 80ish characters long description of the change.
16+
summary: Update Go to 1.26.3
17+
18+
# REQUIRED for breaking-change, deprecation, known-issue
19+
# Long description; in case the summary is not enough to describe the change
20+
# this field accommodate a description without length limits.
21+
# description:
22+
23+
# REQUIRED for breaking-change, deprecation, known-issue
24+
# impact:
25+
26+
# REQUIRED for breaking-change, deprecation, known-issue
27+
# action:
28+
29+
# REQUIRED for all kinds
30+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
31+
component: all
32+
33+
# AUTOMATED
34+
# OPTIONAL to manually add other PR URLs
35+
# PR URL: A link the PR that added the changeset.
36+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
37+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
38+
# Please provide it if you are adding a fragment for a different PR.
39+
# pr: https://github.com/owner/repo/1234
40+
41+
# AUTOMATED
42+
# OPTIONAL to manually add other issue URLs
43+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
44+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
45+
# issue: https://github.com/owner/repo/1234

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.25.9-bookworm as builder
1+
FROM golang:1.26.3-bookworm 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.25.9-bookworm as builder
1+
FROM golang:1.26.3-bookworm 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/metricbeat/Dockerfile.debug

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

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

filebeat/input/journald/pkg/journalctl/chroot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func TestNewFactoryChroot(t *testing.T) {
136136
}
137137
case err := <-waitErrChan:
138138
t.Fatalf("error waiting for container to finish: %s", err)
139-
case <-time.After(30 * time.Second):
139+
case <-time.After(time.Minute):
140140
t.Fatal("Container is stuck, stopping the test. Look at the container logs for more information.")
141141
}
142142
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/elastic/beats/v7
22

3-
go 1.25.9
3+
go 1.26.3
44

55
require (
66
cloud.google.com/go/bigquery v1.74.0

heartbeat/Dockerfile

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

33
RUN \
44
apt-get update \

heartbeat/monitors/active/http/task_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ func TestSplitHostnamePort(t *testing.T) {
9797
},
9898
}
9999
for _, test := range urlTests {
100-
test := test
101-
102100
t.Run(test.name, func(t *testing.T) {
103101
url := &url.URL{
104102
Scheme: test.scheme,
@@ -120,7 +118,7 @@ func TestSplitHostnamePort(t *testing.T) {
120118
t.Errorf("Unexpected host for %#v: expected %q, got %q", request, test.expectedHost, host)
121119
}
122120
if port != test.expectedPort {
123-
t.Errorf("Unexpected port for %#v: expected %q, got %q", request, test.expectedPort, port)
121+
t.Errorf("Unexpected port for %#v: expected %d, got %d", request, test.expectedPort, port)
124122
}
125123
}
126124

0 commit comments

Comments
 (0)