diff --git a/.go-version b/.go-version index 88ebadf2c32..e63679c7661 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.19.10 +1.20.6 diff --git a/.golangci.yml b/.golangci.yml index 793f4a05866..db4489901a7 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.6" 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.6" checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.19.10" + go: "1.20.6" # 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.6" 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 123ac9d03fd..ce432e09417 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -9,7 +9,8 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] ==== Breaking changes *Affecting all Beats* - +- Fix status reporting to Elastic-Agent when output configuration is invalid running under Elastic-Agent {pull}35719[35719] +- Upgrade Go to 1.20.6 {pull}36000[36000] *Auditbeat* diff --git a/Vagrantfile b/Vagrantfile index 39084118f33..47bc686d74f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -132,4 +132,48 @@ Vagrant.configure("2") do |config| end end + config.vm.define "beats" do |nodeconfig| + nodeconfig.vm.box = "ubuntu/jammy64" + + # We deliberately set a fully-qualified domain name for the VM; it helps + # test the FQDN feature flag. + nodeconfig.vm.hostname = "beats-dev.elastic.dev.internal" + + nodeconfig.vm.network "private_network", + hostname: true, + ip: "192.168.56.44" # only 192.168.56.0/21 range allowed: https://www.virtualbox.org/manual/ch06.html#network_hostonly + nodeconfig.vm.network "forwarded_port", + guest: 4244, + host: 4244, + id: "delve" + + nodeconfig.vm.provider "virtualbox" do |vb| + # Display the VirtualBox GUI when booting the machine + vb.gui = false + vb.customize ["modifyvm", :id, "--vram", "128"] + # Customize the amount of memory on the VM: + vb.memory = "4096" + end + + nodeconfig.vm.provision "shell", inline: <<-SHELL + apt-get update + apt-get install -y \ + build-essential \ + curl \ + delve \ + make \ + unzip + vim \ + wget + curl -sL -o /tmp/go#{GO_VERSION}.linux-amd64.tar.gz https://go.dev/dl/go#{GO_VERSION}.linux-amd64.tar.gz + tar -C /usr/local -xzf /tmp/go#{GO_VERSION}.linux-amd64.tar.gz + curl -sL -o /tmp/mage_1.15.0_Linux-64bit.tar.gz https://github.com/magefile/mage/releases/download/v1.15.0/mage_1.15.0_Linux-64bit.tar.gz + tar -C /tmp -xf /tmp/mage_1.15.0_Linux-64bit.tar.gz + mv /tmp/mage /usr/local/bin/mage + echo "alias ll='ls -la'" > /etc/profile.d/ll.sh + echo 'export PATH=$PATH:/usr/local/go/bin' > /etc/profile.d/go.sh + echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> /etc/profile.d/go.sh + SHELL + end + end diff --git a/auditbeat/Dockerfile b/auditbeat/Dockerfile index d410055f8d5..d3390a85517 100644 --- a/auditbeat/Dockerfile +++ b/auditbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.6 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.6 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 96458cbffbe..0a639f769f3 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.6 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 bacfa95ca35..e6787232a5b 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.6 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 da68b4fb5d1..c4f357ec5a2 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.6 as builder ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index 64a658ee77f..082d9748a39 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -138,7 +138,7 @@ func DefaultTestBinaryArgs() TestBinaryArgs { } // GoTestIntegrationForModule executes the Go integration tests sequentially. -// Currently all test cases must be present under "./module" directory. +// Currently, all test cases must be present under "./module" directory. // // Motivation: previous implementation executed all integration tests at once, // causing high CPU load, high memory usage and resulted in timeouts. @@ -307,12 +307,15 @@ func GoTest(ctx context.Context, params GoTestArgs) error { // Generate a HTML code coverage report. var htmlCoverReport string if params.CoverageProfileFile != "" { + htmlCoverReport = strings.TrimSuffix(params.CoverageProfileFile, filepath.Ext(params.CoverageProfileFile)) + ".html" + coverToHTML := sh.RunCmd("go", "tool", "cover", "-html="+params.CoverageProfileFile, "-o", htmlCoverReport) - if err = coverToHTML(); err != nil { + + if err := coverToHTML(); err != nil { return fmt.Errorf("failed to write HTML code coverage report: %w", err) } } diff --git a/dev-tools/mage/gotest_test.go b/dev-tools/mage/gotest_test.go index edbb1e549f9..49784c0fd6c 100644 --- a/dev-tools/mage/gotest_test.go +++ b/dev-tools/mage/gotest_test.go @@ -210,41 +210,41 @@ var wantTestAssertOutput = `(?sm: Error Trace: gotest_test.go:\d+.* Error: Should be true.* Test: TestGoTest_Helper_AssertOutput/assert_fails.* - --- FAIL: TestGoTest_Helper_AssertOutput/assert_fails .* + === FAIL: dev-tools/mage TestGoTest_Helper_AssertOutput/assert_with_message .* gotest_test.go:\d+:.* Error Trace: gotest_test.go:\d+.* Error: Should be true.* Test: TestGoTest_Helper_AssertOutput/assert_with_message.* Messages: My message.* - --- FAIL: TestGoTest_Helper_AssertOutput/assert_with_message .* + === FAIL: dev-tools/mage TestGoTest_Helper_AssertOutput/assert_with_messagef .* gotest_test.go:\d+:.* Error Trace: gotest_test.go:\d+.* Error: Should be true.* Test: TestGoTest_Helper_AssertOutput/assert_with_messagef.* Messages: My message with arguments: 42.* - --- FAIL: TestGoTest_Helper_AssertOutput/assert_with_messagef .* + === FAIL: dev-tools/mage TestGoTest_Helper_AssertOutput/require_fails .* gotest_test.go:\d+:.* Error Trace: gotest_test.go:\d+.* Error: Should be true.* Test: TestGoTest_Helper_AssertOutput/require_fails.* - --- FAIL: TestGoTest_Helper_AssertOutput/require_fails .* + === FAIL: dev-tools/mage TestGoTest_Helper_AssertOutput/require_with_message .* gotest_test.go:\d+:.* Error Trace: gotest_test.go:\d+.* Error: Should be true.* Test: TestGoTest_Helper_AssertOutput/require_with_message.* Messages: My message.* - --- FAIL: TestGoTest_Helper_AssertOutput/require_with_message .* + === FAIL: dev-tools/mage TestGoTest_Helper_AssertOutput/require_with_messagef .* gotest_test.go:\d+:.* Error Trace: gotest_test.go:\d+.* Error: Should be true.* Test: TestGoTest_Helper_AssertOutput/require_with_messagef.* Messages: My message with arguments: 42.* - --- FAIL: TestGoTest_Helper_AssertOutput/require_with_messagef .* + === FAIL: dev-tools/mage TestGoTest_Helper_AssertOutput/equals_map .* gotest_test.go:\d+:.* Error Trace: gotest_test.go:\d+.* @@ -306,17 +306,17 @@ var wantTestLogOutput = `(?sm: gotest_test.go:\d+: printf style log message: 42.* gotest_test.go:\d+: Log should fail.* gotest_test.go:\d+: Log should fail with printf style log: 23.* - --- FAIL: TestGoTest_Helper_LogOutput/on_error.* + === FAIL: dev-tools/mage TestGoTest_Helper_LogOutput/on_fatal.* gotest_test.go:\d+: Log message should be printed.* gotest_test.go:\d+: printf style log message: 42.* gotest_test.go:\d+: Log should fail.* - --- FAIL: TestGoTest_Helper_LogOutput/on_fatal.* + === FAIL: dev-tools/mage TestGoTest_Helper_LogOutput/on_fatalf.* gotest_test.go:\d+: Log message should be printed.* gotest_test.go:\d+: printf style log message: 42.* gotest_test.go:\d+: Log should fail with printf style log: 42.* - --- FAIL: TestGoTest_Helper_LogOutput/on_fatalf.* + === FAIL: dev-tools/mage TestGoTest_Helper_LogOutput/with_newlines.* gotest_test.go:\d+: Log.* message.* @@ -336,7 +336,7 @@ var wantTestLogOutput = `(?sm: style.* log:.* 42.* - --- FAIL: TestGoTest_Helper_LogOutput/with_newlines.* + === FAIL: dev-tools/mage TestGoTest_Helper_LogOutput.* DONE 5 tests, 5 failures in.* )` diff --git a/filebeat/input/syslog/format_check.go b/filebeat/input/syslog/format_check.go index 5ba3e551003..8d646e10f7d 100644 --- a/filebeat/input/syslog/format_check.go +++ b/filebeat/input/syslog/format_check.go @@ -17,7 +17,7 @@ // Code generated by ragel DO NOT EDIT. // -//line parser/format_check.rl:1 +// line-disable-directive parser/format_check.rl:1 package syslog //line format_check.go:8 @@ -27,7 +27,7 @@ const format_check_error int = 0 const format_check_en_main int = 1 -//line parser/format_check.rl:9 +// line-disable-directive parser/format_check.rl:9 func IsRFC5424Format(data []byte) bool { var p, cs int @@ -143,7 +143,7 @@ func IsRFC5424Format(data []byte) bool { } goto st0 tr9: -//line parser/format_check.rl:17 + // line-disable-directive parser/format_check.rl:17 isRFC5424 = true @@ -294,7 +294,7 @@ func IsRFC5424Format(data []byte) bool { } } -//line parser/format_check.rl:28 + // line-disable-directive parser/format_check.rl:28 return isRFC5424 } diff --git a/filebeat/input/syslog/rfc3164_parser.go b/filebeat/input/syslog/rfc3164_parser.go index d717ee7be4c..63d43cdf200 100644 --- a/filebeat/input/syslog/rfc3164_parser.go +++ b/filebeat/input/syslog/rfc3164_parser.go @@ -17,7 +17,7 @@ // Code generated by ragel DO NOT EDIT. // -//line parser/rfc3164_parser.rl:1 +// line-disable-directive parser/rfc3164_parser.rl:1 package syslog //line rfc3164_parser.go:8 @@ -28,7 +28,7 @@ const syslog_rfc3154_error int = -1 const syslog_rfc3154_en_main int = 0 const syslog_rfc3154_en_catch_all int = 1 -//line parser/rfc3164_parser.rl:9 +// line-disable-directive parser/rfc3164_parser.rl:9 var ( noDuplicates = []byte{'-', '.'} @@ -332,17 +332,17 @@ func ParserRFC3164(data []byte, event *event) { } goto tr0 tr0: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st2 tr134: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -355,17 +355,17 @@ func ParserRFC3164(data []byte, event *event) { //line rfc3164_parser.go:342 goto st2 tr1: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st3 tr135: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -399,17 +399,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr14: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st4 tr136: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -452,7 +452,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr18: -//line parser/common.rl:19 + // line-disable-directive parser/common.rl:19 event.SetYear(data[tok:p]) @@ -468,7 +468,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr19: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -493,7 +493,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr21: -//line parser/common.rl:23 + // line-disable-directive parser/common.rl:23 event.SetMonthNumeric(data[tok:p]) @@ -509,7 +509,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr22: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -542,7 +542,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr24: -//line parser/common.rl:27 + // line-disable-directive parser/common.rl:27 event.SetDay(data[tok:p]) @@ -561,7 +561,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr25: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -586,7 +586,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr28: -//line parser/common.rl:31 + // line-disable-directive parser/common.rl:31 event.SetHour(data[tok:p]) @@ -602,7 +602,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr29: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -627,7 +627,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr31: -//line parser/common.rl:35 + // line-disable-directive parser/common.rl:35 event.SetMinute(data[tok:p]) @@ -643,7 +643,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr32: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -684,19 +684,19 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr34: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) goto st23 tr61: -//line parser/common.rl:103 + // line-disable-directive parser/common.rl:103 event.SetTimeZone(data[tok:p]) goto st23 tr68: -//line parser/common.rl:43 + // line-disable-directive parser/common.rl:43 event.SetNanosecond(data[tok:p]) @@ -732,11 +732,11 @@ func ParserRFC3164(data []byte, event *event) { } goto tr0 tr39: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -751,7 +751,7 @@ func ParserRFC3164(data []byte, event *event) { goto st24 tr42: -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -796,11 +796,11 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr40: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -815,7 +815,7 @@ func ParserRFC3164(data []byte, event *event) { goto st25 tr43: -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -867,7 +867,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr45: -//line parser/common.rl:91 + // line-disable-directive parser/common.rl:91 event.SetHostname(data[tok:p]) @@ -891,7 +891,7 @@ func ParserRFC3164(data []byte, event *event) { } goto tr47 tr47: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -917,7 +917,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st27 tr49: -//line parser/common.rl:95 + // line-disable-directive parser/common.rl:95 event.SetProgram(data[tok:p]) @@ -949,7 +949,7 @@ func ParserRFC3164(data []byte, event *event) { st_case_29: goto tr0 tr50: -//line parser/common.rl:95 + // line-disable-directive parser/common.rl:95 event.SetProgram(data[tok:p]) @@ -965,7 +965,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr52: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -984,7 +984,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr54: -//line parser/common.rl:99 + // line-disable-directive parser/common.rl:99 event.SetPid(data[tok:p]) @@ -1012,7 +1012,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr46: -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -1025,7 +1025,7 @@ func ParserRFC3164(data []byte, event *event) { } } -//line parser/common.rl:91 + // line-disable-directive parser/common.rl:91 event.SetHostname(data[tok:p]) @@ -1068,7 +1068,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr57: -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -1083,7 +1083,7 @@ func ParserRFC3164(data []byte, event *event) { goto st35 tr58: -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -1096,7 +1096,7 @@ func ParserRFC3164(data []byte, event *event) { } } -//line parser/common.rl:91 + // line-disable-directive parser/common.rl:91 event.SetHostname(data[tok:p]) @@ -1139,11 +1139,11 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr41: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -1158,7 +1158,7 @@ func ParserRFC3164(data []byte, event *event) { goto st36 tr44: -//line parser/common.rl:80 + // line-disable-directive parser/common.rl:80 if p-1 > 0 { for _, b := range noDuplicates { @@ -1203,21 +1203,21 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr35: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st37 tr69: -//line parser/common.rl:43 + // line-disable-directive parser/common.rl:43 event.SetNanosecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1286,19 +1286,19 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr37: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) goto st42 tr65: -//line parser/common.rl:103 + // line-disable-directive parser/common.rl:103 event.SetTimeZone(data[tok:p]) goto st42 tr71: -//line parser/common.rl:43 + // line-disable-directive parser/common.rl:43 event.SetNanosecond(data[tok:p]) @@ -1317,7 +1317,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr63: -//line parser/common.rl:103 + // line-disable-directive parser/common.rl:103 event.SetTimeZone(data[tok:p]) @@ -1341,7 +1341,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr36: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) @@ -1357,7 +1357,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr67: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1392,21 +1392,21 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr38: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st46 tr72: -//line parser/common.rl:43 + // line-disable-directive parser/common.rl:43 event.SetNanosecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1432,7 +1432,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr26: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1448,17 +1448,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr4: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st48 tr137: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1501,7 +1501,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr77: -//line parser/common.rl:15 + // line-disable-directive parser/common.rl:15 event.SetMonth(data[tok:p]) @@ -1543,7 +1543,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr83: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1562,7 +1562,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr84: -//line parser/common.rl:27 + // line-disable-directive parser/common.rl:27 event.SetDay(data[tok:p]) @@ -1581,7 +1581,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr85: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1606,7 +1606,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr88: -//line parser/common.rl:31 + // line-disable-directive parser/common.rl:31 event.SetHour(data[tok:p]) @@ -1622,7 +1622,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr89: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1647,7 +1647,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr91: -//line parser/common.rl:35 + // line-disable-directive parser/common.rl:35 event.SetMinute(data[tok:p]) @@ -1663,7 +1663,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr92: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1696,7 +1696,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr94: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) @@ -1712,7 +1712,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr95: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1739,7 +1739,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr86: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1755,7 +1755,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr80: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1771,7 +1771,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr81: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1795,7 +1795,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr82: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1882,17 +1882,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr5: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st75 tr138: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1968,17 +1968,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr6: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st82 tr139: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2054,17 +2054,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr7: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st89 tr140: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2149,17 +2149,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr8: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st95 tr141: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2216,17 +2216,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr9: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st99 tr142: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2251,17 +2251,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr10: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st101 tr143: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2301,17 +2301,17 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr11: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st104 tr144: -//line parser/common.rl:107 + // line-disable-directive parser/common.rl:107 event.SetSequence(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2360,7 +2360,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr2: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2442,7 +2442,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr133: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2482,7 +2482,7 @@ func ParserRFC3164(data []byte, event *event) { } goto tr134 tr3: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2498,7 +2498,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr145: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2562,7 +2562,7 @@ func ParserRFC3164(data []byte, event *event) { } goto st2 tr147: -//line parser/common.rl:7 + // line-disable-directive parser/common.rl:7 event.SetPriority(data[tok:p]) @@ -2608,7 +2608,7 @@ func ParserRFC3164(data []byte, event *event) { st_case_1: goto tr12 tr12: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2994,7 +2994,7 @@ func ParserRFC3164(data []byte, event *event) { if (p) == eof { switch cs { case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122: -//line parser/common.rl:11 + // line-disable-directive parser/common.rl:11 event.SetMessage(data[tok:p]) @@ -3004,6 +3004,6 @@ func ParserRFC3164(data []byte, event *event) { } -//line parser/rfc3164_parser.rl:28 + // line-disable-directive parser/rfc3164_parser.rl:28 } diff --git a/filebeat/input/syslog/rfc5424_parser.go b/filebeat/input/syslog/rfc5424_parser.go index 7d9761b5ad4..9d935d8c866 100644 --- a/filebeat/input/syslog/rfc5424_parser.go +++ b/filebeat/input/syslog/rfc5424_parser.go @@ -17,7 +17,7 @@ // Code generated by ragel DO NOT EDIT. // -//line parser/rfc5424_parser.rl:1 +// line-disable-directive parser/rfc5424_parser.rl:1 package syslog //line rfc5424_parser.go:8 @@ -27,7 +27,7 @@ const syslog_rfc5424_error int = 0 const syslog_rfc5424_en_main int = 1 -//line parser/rfc5424_parser.rl:9 +// line-disable-directive parser/rfc5424_parser.rl:9 type machineState struct { sd_id string @@ -1266,7 +1266,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr2: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1282,7 +1282,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr5: -//line parser/common.rl:7 + // line-disable-directive parser/common.rl:7 event.SetPriority(data[tok:p]) @@ -1298,7 +1298,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr6: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1317,7 +1317,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr7: -//line parser/common.rl:111 + // line-disable-directive parser/common.rl:111 event.SetVersion(data[tok:p]) @@ -1345,7 +1345,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr586: -//line parser/common.rl:103 + // line-disable-directive parser/common.rl:103 event.SetTimeZone(data[tok:p]) @@ -1361,7 +1361,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr12: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1380,7 +1380,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr13: -//line parser/common.rl:91 + // line-disable-directive parser/common.rl:91 event.SetHostname(data[tok:p]) @@ -1396,7 +1396,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr15: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1415,7 +1415,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr16: -//line parser/common.rl:115 + // line-disable-directive parser/common.rl:115 event.SetAppName(data[tok:p]) @@ -1431,7 +1431,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr18: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1450,7 +1450,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr19: -//line parser/common.rl:119 + // line-disable-directive parser/common.rl:119 event.SetProcID(data[tok:p]) @@ -1466,7 +1466,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr21: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1485,7 +1485,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr22: -//line parser/common.rl:123 + // line-disable-directive parser/common.rl:123 event.SetMsgID(data[tok:p]) @@ -1519,7 +1519,7 @@ func ParserRFC5424(data []byte, event *event) { st_case_589: goto tr600 tr600: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1532,7 +1532,7 @@ func ParserRFC5424(data []byte, event *event) { //line rfc5424_parser.go:1519 goto st590 tr25: -//line parser/common.rl:48 + // line-disable-directive parser/common.rl:48 event.data = EventData{} @@ -1560,7 +1560,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr26: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1589,7 +1589,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr27: -//line parser/common.rl:64 + // line-disable-directive parser/common.rl:64 state.sd_id = string(data[tok:p]) if _, ok := event.data[state.sd_id]; ok { @@ -1623,7 +1623,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr30: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2259,7 +2259,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr32: -//line parser/common.rl:56 + // line-disable-directive parser/common.rl:56 state.sd_param_name = string(data[tok:p]) @@ -2289,7 +2289,7 @@ func ParserRFC5424(data []byte, event *event) { } goto tr64 tr64: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2310,11 +2310,11 @@ func ParserRFC5424(data []byte, event *event) { } goto st54 tr67: -//line parser/common.rl:60 + // line-disable-directive parser/common.rl:60 event.SetData(state.sd_id, state.sd_param_name, data, tok, p, state.sd_value_bs) -//line parser/common.rl:52 + // line-disable-directive parser/common.rl:52 state.sd_value_bs = []int{} @@ -2343,7 +2343,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr29: -//line parser/common.rl:64 + // line-disable-directive parser/common.rl:64 state.sd_id = string(data[tok:p]) if _, ok := event.data[state.sd_id]; ok { @@ -2368,17 +2368,17 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr65: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p -//line parser/common.rl:73 + // line-disable-directive parser/common.rl:73 state.sd_value_bs = append(state.sd_value_bs, p) goto st56 tr68: -//line parser/common.rl:73 + // line-disable-directive parser/common.rl:73 state.sd_value_bs = append(state.sd_value_bs, p) @@ -8565,7 +8565,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr10: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8608,7 +8608,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr559: -//line parser/common.rl:19 + // line-disable-directive parser/common.rl:19 event.SetYear(data[tok:p]) @@ -8627,7 +8627,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr560: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8652,7 +8652,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr563: -//line parser/common.rl:23 + // line-disable-directive parser/common.rl:23 event.SetMonthNumeric(data[tok:p]) @@ -8674,7 +8674,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr564: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8699,7 +8699,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr568: -//line parser/common.rl:27 + // line-disable-directive parser/common.rl:27 event.SetDay(data[tok:p]) @@ -8718,7 +8718,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr569: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8743,7 +8743,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr572: -//line parser/common.rl:31 + // line-disable-directive parser/common.rl:31 event.SetHour(data[tok:p]) @@ -8759,7 +8759,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr573: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8784,7 +8784,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr575: -//line parser/common.rl:35 + // line-disable-directive parser/common.rl:35 event.SetMinute(data[tok:p]) @@ -8800,7 +8800,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr576: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8832,21 +8832,21 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr578: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st566 tr588: -//line parser/common.rl:43 + // line-disable-directive parser/common.rl:43 event.SetNanosecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8898,21 +8898,21 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr580: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p goto st571 tr590: -//line parser/common.rl:43 + // line-disable-directive parser/common.rl:43 event.SetNanosecond(data[tok:p]) -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8928,7 +8928,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr579: -//line parser/common.rl:39 + // line-disable-directive parser/common.rl:39 event.SetSecond(data[tok:p]) @@ -8944,7 +8944,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr587: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9050,7 +9050,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr570: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9066,7 +9066,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr565: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9082,7 +9082,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr566: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9098,7 +9098,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr561: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9135,7 +9135,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr3: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9157,7 +9157,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr4: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -10965,16 +10965,16 @@ func ParserRFC5424(data []byte, event *event) { if (p) == eof { switch cs { case 590: -//line parser/common.rl:11 + // line-disable-directive parser/common.rl:11 event.SetMessage(data[tok:p]) case 589: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p -//line parser/common.rl:11 + // line-disable-directive parser/common.rl:11 event.SetMessage(data[tok:p]) @@ -10987,6 +10987,6 @@ func ParserRFC5424(data []byte, event *event) { } } -//line parser/rfc5424_parser.rl:35 + // line-disable-directive parser/rfc5424_parser.rl:35 } diff --git a/heartbeat/Dockerfile b/heartbeat/Dockerfile index 4f063983998..776d8290f7d 100644 --- a/heartbeat/Dockerfile +++ b/heartbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.6 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.6 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 fb25df72fc5..01c3e225870 100644 --- a/libbeat/docs/version.asciidoc +++ b/libbeat/docs/version.asciidoc @@ -1,6 +1,6 @@ :stack-version: 8.10.0 :doc-branch: main -:go-version: 1.19.10 +:go-version: 1.20.6 :release-state: unreleased :python: 3.7 :docker: 1.12 diff --git a/libbeat/reader/syslog/rfc3164_test.go b/libbeat/reader/syslog/rfc3164_test.go index 2f14fd9e22b..d1c75fe574e 100644 --- a/libbeat/reader/syslog/rfc3164_test.go +++ b/libbeat/reader/syslog/rfc3164_test.go @@ -156,7 +156,7 @@ func TestParseRFC3164(t *testing.T) { hostname: "test-host", msg: "this is the message", }, - wantErr: `validation error at position 5: parsing time "24-08-2003T05:14:15-07:00" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse "8-2003T05:14:15-07:00" as "2006"`, + wantErr: `validation error at position 5: parsing time "24-08-2003T05:14:15-07:00" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse "24-08-2003T05:14:15-07:00" as "2006"`, }, "err-eof": { in: "<13>Oct 11 22:14:15 test-", diff --git a/libbeat/reader/syslog/rfc5424_test.go b/libbeat/reader/syslog/rfc5424_test.go index 539278a8c69..47cb9ee0e36 100644 --- a/libbeat/reader/syslog/rfc5424_test.go +++ b/libbeat/reader/syslog/rfc5424_test.go @@ -153,7 +153,7 @@ func TestParseRFC5424(t *testing.T) { msgID: "ID47", rawSDValue: `[exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"][examplePriority@32473 class="high"]`, }, - wantErr: `validation error at position 8: parsing time "10-11-2003T22:14:15.003Z" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse "1-2003T22:14:15.003Z" as "2006"`, + wantErr: "validation error at position 8: parsing time \"10-11-2003T22:14:15.003Z\" as \"2006-01-02T15:04:05.999999999Z07:00\": cannot parse \"10-11-2003T22:14:15.003Z\" as \"2006\"", }, "err-eof": { in: `<13>1 2003-08-24T05:14:15.000003-07:00 test-host su 1234 msg-`, diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile index 407d9e4fac8..d02c807d375 100644 --- a/metricbeat/Dockerfile +++ b/metricbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.6 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.6 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 8565b542b1a..1ddf090399b 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.6 COPY test/main.go main.go diff --git a/metricbeat/module/nats/_meta/Dockerfile b/metricbeat/module/nats/_meta/Dockerfile index bbc62eaa888..a12879d2804 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.6 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 4d6e1f522e0..74490244201 100644 --- a/packetbeat/Dockerfile +++ b/packetbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.6 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.6 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 3d0953e88e1..8de2b067034 100644 --- a/x-pack/functionbeat/Dockerfile +++ b/x-pack/functionbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.10 +FROM golang:1.20.6 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.6 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 db00a41578f..acee2d22c09 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.6 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 .