diff --git a/.go-version b/.go-version index e54f3135a7de..e63679c7661b 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.19.12 +1.20.6 diff --git a/.golangci.yml b/.golangci.yml index 845d95593c47..2d350878de96 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.19.12" + 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 @@ -120,19 +120,19 @@ linters-settings: staticcheck: # Select the Go version to target. The default is '1.13'. - go: "1.19.12" + go: "1.20.6" checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.19.12" + 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.12" + go: "1.20.6" gosec: excludes: diff --git a/auditbeat/Dockerfile b/auditbeat/Dockerfile index 17a6f2cc93fc..d3390a855177 100644 --- a/auditbeat/Dockerfile +++ b/auditbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.12 +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 new file mode 100644 index 000000000000..0a639f769f37 --- /dev/null +++ b/dev-tools/kubernetes/filebeat/Dockerfile.debug @@ -0,0 +1,21 @@ +FROM golang:1.20.6 as builder + +ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin + +ENV CGO_ENABLED=0 + +RUN go install github.com/go-delve/delve/cmd/dlv@v1.9.0 + +COPY build/filebeat-debugger /usr/share/filebeat/filebeat-debugger + +FROM alpine:3.15 + +ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin + +WORKDIR /usr/share/filebeat + +COPY --from=builder /go/bin/dlv /go/bin/dlv +COPY --from=builder /usr/share/filebeat/filebeat-debugger /usr/share/filebeat/filebeat-debugger + +ENTRYPOINT ["dlv", "--headless", "--listen=:56268", "--api-version=2", "--log", "--log-output", "debugger", "exec", "/usr/share/filebeat/filebeat-debugger", "--"] +CMD [ "-e" ] diff --git a/dev-tools/kubernetes/heartbeat/Dockerfile.debug b/dev-tools/kubernetes/heartbeat/Dockerfile.debug new file mode 100644 index 000000000000..e6787232a5b2 --- /dev/null +++ b/dev-tools/kubernetes/heartbeat/Dockerfile.debug @@ -0,0 +1,21 @@ +FROM golang:1.20.6 as builder + +ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin + +ENV CGO_ENABLED=0 + +RUN go install github.com/go-delve/delve/cmd/dlv@v1.9.0 + +COPY build/heartbeat-debugger /usr/share/heartbeat/heartbeat-debugger + +FROM alpine:3.16 + +ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin + +WORKDIR /usr/share/heartbeat + +COPY --from=builder /go/bin/dlv /go/bin/dlv +COPY --from=builder /usr/share/heartbeat/heartbeat-debugger /usr/share/heartbeat/heartbeat-debugger + +ENTRYPOINT ["dlv", "--headless", "--listen=:56268", "--api-version=2", "--log", "--log-output", "debugger", "exec", "/usr/share/heartbeat/heartbeat-debugger", "--"] +CMD [ "-e" ] diff --git a/dev-tools/kubernetes/metricbeat/Dockerfile.debug b/dev-tools/kubernetes/metricbeat/Dockerfile.debug new file mode 100644 index 000000000000..c4f357ec5a2a --- /dev/null +++ b/dev-tools/kubernetes/metricbeat/Dockerfile.debug @@ -0,0 +1,21 @@ +FROM golang:1.20.6 as builder + +ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin:/usr/local/go/bin + +ENV CGO_ENABLED=0 + +RUN go install github.com/go-delve/delve/cmd/dlv@v1.9.0 + +COPY build/metricbeat-debugger /usr/share/metricbeat/metricbeat-debugger + +FROM alpine:3.15 + +ENV PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/go/bin + +WORKDIR /usr/share/metricbeat + +COPY --from=builder /go/bin/dlv /go/bin/dlv +COPY --from=builder /usr/share/metricbeat/metricbeat-debugger /usr/share/metricbeat/metricbeat-debugger + +ENTRYPOINT ["dlv", "--headless", "--listen=:56268", "--api-version=2", "--log", "--log-output", "debugger", "exec", "/usr/share/metricbeat/metricbeat-debugger", "--"] +CMD [ "-e" ] diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index a2e6582ca7e0..c21ac3eaa89a 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -126,7 +126,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. @@ -295,13 +295,16 @@ 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 { - return errors.Wrap(err, "failed to write HTML code coverage report") + + 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 edbb1e549f99..49784c0fd6c2 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 5ba3e5510032..8d646e10f7d8 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 d717ee7be4cb..63d43cdf200d 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 8622f309fb26..758bf4843b55 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]) @@ -1358,7 +1358,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]) @@ -1374,7 +1374,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr12: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1393,7 +1393,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]) @@ -1409,7 +1409,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr15: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1428,7 +1428,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]) @@ -1444,7 +1444,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr18: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1463,7 +1463,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]) @@ -1479,7 +1479,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr21: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1498,7 +1498,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]) @@ -1532,7 +1532,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 @@ -1545,7 +1545,7 @@ func ParserRFC5424(data []byte, event *event) { //line rfc5424_parser.go:1532 goto st590 tr25: -//line parser/common.rl:48 + // line-disable-directive parser/common.rl:48 event.data = EventData{} @@ -1573,7 +1573,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr26: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -1602,7 +1602,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 { @@ -1636,7 +1636,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr30: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2272,7 +2272,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]) @@ -2302,7 +2302,7 @@ func ParserRFC5424(data []byte, event *event) { } goto tr64 tr64: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -2323,11 +2323,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{} @@ -2356,7 +2356,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 { @@ -2381,17 +2381,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) @@ -8578,7 +8578,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr10: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8621,7 +8621,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]) @@ -8640,7 +8640,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr560: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8665,7 +8665,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]) @@ -8687,7 +8687,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr564: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8712,7 +8712,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]) @@ -8731,7 +8731,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr569: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8756,7 +8756,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]) @@ -8772,7 +8772,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr573: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8797,7 +8797,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]) @@ -8813,7 +8813,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr576: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -8845,21 +8845,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 @@ -8920,7 +8920,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]) @@ -8936,7 +8936,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr587: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9042,7 +9042,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr570: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9058,7 +9058,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr565: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9074,7 +9074,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr566: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9090,7 +9090,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr561: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9127,7 +9127,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr3: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -9149,7 +9149,7 @@ func ParserRFC5424(data []byte, event *event) { } goto st0 tr4: -//line parser/common.rl:3 + // line-disable-directive parser/common.rl:3 tok = p @@ -10957,16 +10957,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]) @@ -10979,6 +10979,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 52a87012c7ee..776d8290f7d1 100644 --- a/heartbeat/Dockerfile +++ b/heartbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.12 +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 98cf087c9e68..1e68e4ba918d 100644 --- a/libbeat/docs/version.asciidoc +++ b/libbeat/docs/version.asciidoc @@ -1,6 +1,6 @@ :stack-version: 7.17.14 :doc-branch: 7.17 -:go-version: 1.19.12 +:go-version: 1.20.6 :release-state: unreleased :python: 3.7 :docker: 1.12 diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile index 6acb23f9ee5a..5f57c931a0af 100644 --- a/metricbeat/Dockerfile +++ b/metricbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.12 +FROM golang:1.20.6 RUN \ apt 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/metricbeat/module/http/_meta/Dockerfile b/metricbeat/module/http/_meta/Dockerfile index 88b4a998e1f9..1ddf090399b5 100644 --- a/metricbeat/module/http/_meta/Dockerfile +++ b/metricbeat/module/http/_meta/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.12 +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 1aa49898dff8..a12879d28046 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.12 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 a9472f155e5b..74490244201c 100644 --- a/packetbeat/Dockerfile +++ b/packetbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.12 +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/filebeat/processors/decode_cef/cef/parser.go b/x-pack/filebeat/processors/decode_cef/cef/parser.go index aab9331f7eb3..487e1083d97a 100644 --- a/x-pack/filebeat/processors/decode_cef/cef/parser.go +++ b/x-pack/filebeat/processors/decode_cef/cef/parser.go @@ -4,7 +4,7 @@ // Code generated by ragel DO NOT EDIT. // -//line cef.rl:1 +// line-disable-directive cef.rl:1 package cef import ( @@ -14,7 +14,7 @@ import ( "go.uber.org/multierr" ) -//line parser.go:15 +// line-disable-directive parser.go:15 var _cef_eof_actions []byte = []byte{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -32,7 +32,7 @@ const cef_en_gobble_extension int = 33 const cef_en_main int = 1 const cef_en_main_cef_extensions int = 29 -//line cef.rl:16 +// line-disable-directive cef.rl:16 type cefState struct { key string // Extension key. @@ -54,7 +54,7 @@ func (s *cefState) pushEscape(start, end int) { // unpack unpacks a CEF message. // -//line parser.rl:17 +// line-disable-directive parser.rl:17 func (e *Event) unpack(data string) error { cs, p, pe, eof := 0, 0, len(data), len(data) mark, mark_slash := 0, 0 @@ -68,12 +68,12 @@ func (e *Event) unpack(data string) error { e.init(data) -//line parser.go:70 + // line-disable-directive parser.go:70 { cs = cef_start } -//line parser.go:75 + // line-disable-directive parser.go:75 { if (p) == (pe) { goto _test_eof @@ -978,72 +978,72 @@ func (e *Event) unpack(data string) error { goto f26 f0: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p goto _again f4: -//line cef.rl:55 + // line-disable-directive cef.rl:55 mark_slash = p goto _again f6: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) goto _again f1: -//line cef.rl:61 + // line-disable-directive cef.rl:61 e.Version, _ = strconv.Atoi(data[mark:p]) goto _again f5: -//line cef.rl:64 + // line-disable-directive cef.rl:64 e.DeviceVendor = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f10: -//line cef.rl:68 + // line-disable-directive cef.rl:68 e.DeviceProduct = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f13: -//line cef.rl:72 + // line-disable-directive cef.rl:72 e.DeviceVersion = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f16: -//line cef.rl:76 + // line-disable-directive cef.rl:76 e.DeviceEventClassID = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f19: -//line cef.rl:80 + // line-disable-directive cef.rl:80 e.Name = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f22: -//line cef.rl:84 + // line-disable-directive cef.rl:84 e.Severity = data[mark:p] goto _again f23: -//line cef.rl:87 + // line-disable-directive cef.rl:87 // A new extension key marks the end of the last extension value. if len(state.key) > 0 && state.valueStart <= mark-1 { @@ -1054,20 +1054,20 @@ func (e *Event) unpack(data string) error { goto _again f29: -//line cef.rl:95 + // line-disable-directive cef.rl:95 state.valueStart = p state.valueEnd = p goto _again f25: -//line cef.rl:99 + // line-disable-directive cef.rl:99 state.valueEnd = p + 1 goto _again f24: -//line cef.rl:109 + // line-disable-directive cef.rl:109 recoveredErrs = append(recoveredErrs, fmt.Errorf("malformed value for %s at pos %d", state.key, p+1)) (p)-- @@ -1075,7 +1075,7 @@ func (e *Event) unpack(data string) error { goto _again f26: -//line cef.rl:113 + // line-disable-directive cef.rl:113 state.reset() // Resume processing at p, the start of the next extension key. @@ -1084,193 +1084,193 @@ func (e *Event) unpack(data string) error { goto _again f2: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:55 + // line-disable-directive cef.rl:55 mark_slash = p goto _again f3: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:64 + // line-disable-directive cef.rl:64 e.DeviceVendor = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f9: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:68 + // line-disable-directive cef.rl:68 e.DeviceProduct = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f12: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:72 + // line-disable-directive cef.rl:72 e.DeviceVersion = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f15: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:76 + // line-disable-directive cef.rl:76 e.DeviceEventClassID = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f18: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:80 + // line-disable-directive cef.rl:80 e.Name = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f21: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:84 + // line-disable-directive cef.rl:84 e.Severity = data[mark:p] goto _again f33: -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p -//line cef.rl:99 + // line-disable-directive cef.rl:99 state.valueEnd = p + 1 goto _again f7: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:55 + // line-disable-directive cef.rl:55 mark_slash = p goto _again f8: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:64 + // line-disable-directive cef.rl:64 e.DeviceVendor = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f11: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:68 + // line-disable-directive cef.rl:68 e.DeviceProduct = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f14: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:72 + // line-disable-directive cef.rl:72 e.DeviceVersion = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f17: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:76 + // line-disable-directive cef.rl:76 e.DeviceEventClassID = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f20: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:80 + // line-disable-directive cef.rl:80 e.Name = replaceEscapes(data[mark:p], mark, state.escapes) state.reset() goto _again f35: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:99 + // line-disable-directive cef.rl:99 state.valueEnd = p + 1 goto _again f30: -//line cef.rl:95 + // line-disable-directive cef.rl:95 state.valueStart = p state.valueEnd = p -//line cef.rl:55 + // line-disable-directive cef.rl:55 mark_slash = p goto _again f28: -//line cef.rl:95 + // line-disable-directive cef.rl:95 state.valueStart = p state.valueEnd = p -//line cef.rl:99 + // line-disable-directive cef.rl:99 state.valueEnd = p + 1 goto _again f32: -//line cef.rl:99 + // line-disable-directive cef.rl:99 state.valueEnd = p + 1 -//line cef.rl:52 + // line-disable-directive cef.rl:52 mark = p @@ -1289,7 +1289,7 @@ func (e *Event) unpack(data string) error { if (p) == eof { switch _cef_eof_actions[cs] { case 32: -//line cef.rl:102 + // line-disable-directive cef.rl:102 // Reaching the EOF marks the end of the final extension value. if len(state.key) > 0 && state.valueStart <= state.valueEnd { @@ -1298,18 +1298,18 @@ func (e *Event) unpack(data string) error { } case 25: -//line cef.rl:109 + // line-disable-directive cef.rl:109 recoveredErrs = append(recoveredErrs, fmt.Errorf("malformed value for %s at pos %d", state.key, p+1)) (p)-- cs = 33 case 35: -//line cef.rl:58 + // line-disable-directive cef.rl:58 state.pushEscape(mark_slash, p) -//line cef.rl:102 + // line-disable-directive cef.rl:102 // Reaching the EOF marks the end of the final extension value. if len(state.key) > 0 && state.valueStart <= state.valueEnd { @@ -1318,12 +1318,12 @@ func (e *Event) unpack(data string) error { } case 28: -//line cef.rl:95 + // line-disable-directive cef.rl:95 state.valueStart = p state.valueEnd = p -//line cef.rl:102 + // line-disable-directive cef.rl:102 // Reaching the EOF marks the end of the final extension value. if len(state.key) > 0 && state.valueStart <= state.valueEnd { @@ -1331,7 +1331,7 @@ func (e *Event) unpack(data string) error { state.reset() } -//line parser.go:1130 + // line-disable-directive parser.go:1130 } } @@ -1340,7 +1340,7 @@ func (e *Event) unpack(data string) error { } } -//line cef.rl:175 + // line-disable-directive cef.rl:175 // Check if state machine completed. if cs < cef_first_final { diff --git a/x-pack/functionbeat/Dockerfile b/x-pack/functionbeat/Dockerfile index a3bb21b33b25..8de2b0670341 100644 --- a/x-pack/functionbeat/Dockerfile +++ b/x-pack/functionbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.12 +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 2cc9ef72439b..acee2d22c095 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.12 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 .