From e17f6022405bdd0d75cd646da03a0683191d5038 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Thu, 6 May 2021 09:17:24 -0700 Subject: [PATCH 01/10] Update to go v1.16.4 --- .go-version | 2 +- CHANGELOG-developer.next.asciidoc | 1 + auditbeat/Dockerfile | 2 +- filebeat/Dockerfile | 2 +- go.mod | 2 +- heartbeat/Dockerfile | 2 +- journalbeat/Dockerfile | 2 +- libbeat/Dockerfile | 2 +- libbeat/docs/version.asciidoc | 2 +- metricbeat/Dockerfile | 2 +- metricbeat/module/http/_meta/Dockerfile | 2 +- packetbeat/Dockerfile | 2 +- x-pack/elastic-agent/Dockerfile | 2 +- x-pack/functionbeat/Dockerfile | 2 +- x-pack/libbeat/Dockerfile | 2 +- 15 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.go-version b/.go-version index 50830c83cca..a23207367c3 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.15.12 +1.16.4 diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index e40b0a28d0f..99ff8254077 100644 --- a/CHANGELOG-developer.next.asciidoc +++ b/CHANGELOG-developer.next.asciidoc @@ -113,3 +113,4 @@ The list below covers the major changes between 7.0.0-rc2 and master only. - Update Go version to 1.15.9. {pull}24442[24442] - Update Go version to 1.15.10. {pull}24606[24606] - Update Go version to 1.15.12. {pull}25629[25629] +- Update Go version to 1.16.4. {issue}25346[25346] diff --git a/auditbeat/Dockerfile b/auditbeat/Dockerfile index b2a882a0300..309403e784e 100644 --- a/auditbeat/Dockerfile +++ b/auditbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ diff --git a/filebeat/Dockerfile b/filebeat/Dockerfile index 0c3b36d9a39..2d5bbdef1ba 100644 --- a/filebeat/Dockerfile +++ b/filebeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ diff --git a/go.mod b/go.mod index 47278a56e8b..b68743a3490 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/elastic/beats/v7 -go 1.15 +go 1.16 require ( 4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b diff --git a/heartbeat/Dockerfile b/heartbeat/Dockerfile index 00f5e50d404..03ff6ad9793 100644 --- a/heartbeat/Dockerfile +++ b/heartbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ diff --git a/journalbeat/Dockerfile b/journalbeat/Dockerfile index 350b3fd32f9..29d60fe1dc4 100644 --- a/journalbeat/Dockerfile +++ b/journalbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ diff --git a/libbeat/Dockerfile b/libbeat/Dockerfile index 41e789be773..49cc104dada 100644 --- a/libbeat/Dockerfile +++ b/libbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ diff --git a/libbeat/docs/version.asciidoc b/libbeat/docs/version.asciidoc index 5b32f59b35e..e0e026cddf2 100644 --- a/libbeat/docs/version.asciidoc +++ b/libbeat/docs/version.asciidoc @@ -1,6 +1,6 @@ :stack-version: 8.0.0 :doc-branch: master -:go-version: 1.15.12 +:go-version: 1.16.4 :release-state: unreleased :python: 3.7 :docker: 1.12 diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile index f57c593c4e6..acc0d31e16c 100644 --- a/metricbeat/Dockerfile +++ b/metricbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt update \ diff --git a/metricbeat/module/http/_meta/Dockerfile b/metricbeat/module/http/_meta/Dockerfile index f0c643747ee..08b11ac5898 100644 --- a/metricbeat/module/http/_meta/Dockerfile +++ b/metricbeat/module/http/_meta/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 COPY test/main.go main.go diff --git a/packetbeat/Dockerfile b/packetbeat/Dockerfile index 54f2cbdcb31..e22c5b5b9fd 100644 --- a/packetbeat/Dockerfile +++ b/packetbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ diff --git a/x-pack/elastic-agent/Dockerfile b/x-pack/elastic-agent/Dockerfile index 8636ff37944..c3e8e98e69a 100644 --- a/x-pack/elastic-agent/Dockerfile +++ b/x-pack/elastic-agent/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.12.7 +ARG GO_VERSION=1.16.4 FROM circleci/golang:${GO_VERSION} diff --git a/x-pack/functionbeat/Dockerfile b/x-pack/functionbeat/Dockerfile index d6b831f8e1b..99943388b53 100644 --- a/x-pack/functionbeat/Dockerfile +++ b/x-pack/functionbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ diff --git a/x-pack/libbeat/Dockerfile b/x-pack/libbeat/Dockerfile index c40480d08a5..72f27c1dd4c 100644 --- a/x-pack/libbeat/Dockerfile +++ b/x-pack/libbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.12 +FROM golang:1.16.4 RUN \ apt-get update \ From 638f37ae3abb0fb454aafb985dd7d4eb8f3ba667 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Mon, 10 May 2021 10:56:35 -0700 Subject: [PATCH 02/10] Fix go vet warning --- dev-tools/mage/gotest_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-tools/mage/gotest_test.go b/dev-tools/mage/gotest_test.go index 24ce55614cb..f88186a1910 100644 --- a/dev-tools/mage/gotest_test.go +++ b/dev-tools/mage/gotest_test.go @@ -364,7 +364,7 @@ func TestGoTest_Helper_WithWrongPanic(t *testing.T) { t.Run("setup failing go-routine", func(t *testing.T) { go func() { time.Sleep(1 * time.Second) - t.Fatal("oops") + t.Error("oops") }() }) From 85ed551e3f80a3a8840b470758ba7e9cdbf6ca87 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Tue, 11 May 2021 12:35:45 -0700 Subject: [PATCH 03/10] Update NOTICE.txt --- NOTICE.txt | 31 ------------------------------- go.mod | 1 - go.sum | 2 -- 3 files changed, 34 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index f9893b43ddd..ef7b2f1886e 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -37548,37 +37548,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -Dependency : github.com/poy/eachers -Version: v0.0.0-20181020210610-23942921fe77 -Licence type (autodetected): MIT --------------------------------------------------------------------------------- - -Contents of probable licence file $GOMODCACHE/github.com/poy/eachers@v0.0.0-20181020210610-23942921fe77/LICENSE.md: - -The MIT License (MIT) - -Copyright (c) 2016 Andrew Poydence - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -------------------------------------------------------------------------------- Dependency : github.com/prometheus/client_golang Version: v1.1.1-0.20190913103102-20428fa0bffc diff --git a/go.mod b/go.mod index b68743a3490..1a21eb21c5a 100644 --- a/go.mod +++ b/go.mod @@ -132,7 +132,6 @@ require ( github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.0 - github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 // indirect github.com/prometheus/client_golang v1.1.1-0.20190913103102-20428fa0bffc // indirect github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 github.com/prometheus/common v0.7.0 diff --git a/go.sum b/go.sum index 67010c69948..d72feda39f9 100644 --- a/go.sum +++ b/go.sum @@ -674,8 +674,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 h1:SNdqPRvRsVmYR0gKqFvrUKhFizPJ6yDiGQ++VAJIoDg= -github.com/poy/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:x1vqpbcMW9T/KRcQ4b48diSiSVtYgvwQ5xzDByEg4WE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= From a43777e5dac40a1b3f5a22a3b9f313b18d60df94 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Wed, 12 May 2021 08:45:26 -0700 Subject: [PATCH 04/10] Update generator code --- generator/common/beatgen/setup/setup.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generator/common/beatgen/setup/setup.go b/generator/common/beatgen/setup/setup.go index 0bae5ff18e2..d797fd4416c 100644 --- a/generator/common/beatgen/setup/setup.go +++ b/generator/common/beatgen/setup/setup.go @@ -151,5 +151,9 @@ func GitAdd() error { // Update updates the generated files (aka make update). func Update() error { - return sh.Run("make", "update") + err := sh.Run("make", "update") + if err != nil { + return err + } + return gotool.Mod.Tidy() } From 84386203aaca4b95dc33e202a09169f59f9b3b04 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Wed, 19 May 2021 13:12:40 -0700 Subject: [PATCH 05/10] Add MacOS version support to changelog --- CHANGELOG-developer.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index 44dc1945b55..e28d9adf9fe 100644 --- a/CHANGELOG-developer.next.asciidoc +++ b/CHANGELOG-developer.next.asciidoc @@ -54,6 +54,7 @@ The list below covers the major changes between 7.0.0-rc2 and master only. - Make implementing `Close` required for `reader.Reader` interfaces. {pull}20455[20455] - Remove `NumCPU` as clients should update the CPU count on the fly in case of config changes in a VM. {pull}23154[23154] - Remove Metricbeat EventFetcher and EventsFetcher interface. Use the reporter interface instead. {pull}25093[25093] +- Update MacOS SDK and minimum supported version used in build to 10.14. {issue}24193[24193] ==== Bugfixes From c6ff189a3444f9b0c3f2dc2223415405c4e79b68 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Wed, 19 May 2021 14:32:15 -0700 Subject: [PATCH 06/10] Change Darwin build image to debian10 --- CHANGELOG-developer.next.asciidoc | 2 +- dev-tools/mage/crossbuild.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index e28d9adf9fe..385e204be7f 100644 --- a/CHANGELOG-developer.next.asciidoc +++ b/CHANGELOG-developer.next.asciidoc @@ -54,7 +54,7 @@ The list below covers the major changes between 7.0.0-rc2 and master only. - Make implementing `Close` required for `reader.Reader` interfaces. {pull}20455[20455] - Remove `NumCPU` as clients should update the CPU count on the fly in case of config changes in a VM. {pull}23154[23154] - Remove Metricbeat EventFetcher and EventsFetcher interface. Use the reporter interface instead. {pull}25093[25093] -- Update MacOS SDK and minimum supported version used in build to 10.14. {issue}24193[24193] +- Update Darwin build image to a debian 10 base that increases the MacOS SDK and minimum supported version used in build to 10.14. {issue}24193[24193] ==== Bugfixes diff --git a/dev-tools/mage/crossbuild.go b/dev-tools/mage/crossbuild.go index 368bd0a422d..c7fac3f3933 100644 --- a/dev-tools/mage/crossbuild.go +++ b/dev-tools/mage/crossbuild.go @@ -198,7 +198,7 @@ func crossBuildImage(platform string) (string, error) { switch { case strings.HasPrefix(platform, "darwin"): - tagSuffix = "darwin" + tagSuffix = "darwin-debian10" case strings.HasPrefix(platform, "linux/arm"): tagSuffix = "arm" if runtime.GOARCH == "arm64" { From a7bd27248f427b43537db17b36d5da24ee8d1084 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Thu, 20 May 2021 09:01:15 -0700 Subject: [PATCH 07/10] Add MacOS version requirement as breaking change --- CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 194787f4770..e9be53c49d8 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -35,6 +35,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Set `cleanup_timeout` to zero by default in docker and kubernetes autodiscover in all beats except Filebeat where it is kept to 60 seconds. {pull}24681[24681] - Update to ECS 1.9.0. {pull}24909[24909] - Remove id_field_data {pull}25239[25239] +- MacOSX minimum supported version set to 10.14 {issue}24193{24193} *Auditbeat* From 5430837c0fae9799648d4dae28c61a031a350655 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Tue, 25 May 2021 09:12:55 -0700 Subject: [PATCH 08/10] Add pr ref to CHANGELOG --- CHANGELOG-developer.next.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index 385e204be7f..7b2491c72ee 100644 --- a/CHANGELOG-developer.next.asciidoc +++ b/CHANGELOG-developer.next.asciidoc @@ -114,5 +114,5 @@ The list below covers the major changes between 7.0.0-rc2 and master only. - Update Go version to 1.15.9. {pull}24442[24442] - Update Go version to 1.15.10. {pull}24606[24606] - Update Go version to 1.15.12. {pull}25629[25629] -- Update Go version to 1.16.4. {issue}25346[25346] +- Update Go version to 1.16.4. {issue}25346[25346] {pull}25671[25671] - Add sorting to array fields for generated data files (*-generated.json) {pull}25320[25320] From 0d205b386b83a8d228946b01eb5fadcc6737ffa2 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Wed, 26 May 2021 08:56:33 -0700 Subject: [PATCH 09/10] Fix arm7 packaging --- dev-tools/mage/crossbuild.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev-tools/mage/crossbuild.go b/dev-tools/mage/crossbuild.go index c7fac3f3933..a44c326f82f 100644 --- a/dev-tools/mage/crossbuild.go +++ b/dev-tools/mage/crossbuild.go @@ -199,6 +199,8 @@ func crossBuildImage(platform string) (string, error) { switch { case strings.HasPrefix(platform, "darwin"): tagSuffix = "darwin-debian10" + case strings.HasPrefix(platform, "linux/armv7"): + tagSuffix = "armhf" case strings.HasPrefix(platform, "linux/arm"): tagSuffix = "arm" if runtime.GOARCH == "arm64" { From 1e7007c4cc18c1fef2b2c995ca509d5059f9ef48 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Thu, 27 May 2021 10:48:13 -0700 Subject: [PATCH 10/10] Force Journalbeat armv7 image --- journalbeat/magefile.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/journalbeat/magefile.go b/journalbeat/magefile.go index 46d962c69b4..826e19ff138 100644 --- a/journalbeat/magefile.go +++ b/journalbeat/magefile.go @@ -137,6 +137,8 @@ func selectImage(platform string) (string, error) { tagSuffix := "main" switch { + case strings.HasPrefix(platform, "linux/armv7"): + tagSuffix = "armhf" case strings.HasPrefix(platform, "linux/arm"): tagSuffix = "arm" if runtime.GOARCH == "arm64" {