From b1368ee1be0d0eddb866256361b140fa07e0ff14 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Sat, 27 Apr 2024 11:52:52 +0300 Subject: [PATCH 01/16] updated auditbeat --- .buildkite/auditbeat/auditbeat-pipeline.yml | 113 ++++++++++++++------ 1 file changed, 83 insertions(+), 30 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index 801768c271e..ff5f0e5ca84 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -3,7 +3,6 @@ name: "beats-auditbeat" env: AWS_ARM_INSTANCE_TYPE: "m6g.xlarge" - AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2204-aarch64" GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8" @@ -24,12 +23,13 @@ env: ASDF_MAGE_VERSION: 1.15.0 steps: - - group: "Auditbeat Mandatory Testing" + - group: "Auditbeat Mandatory Testing " key: "auditbeat-mandatory-tests" steps: - label: ":ubuntu: Auditbeat Unit Tests" command: | + set -euo pipefail cd auditbeat mage build unitTest agents: @@ -45,6 +45,7 @@ steps: - label: ":rhel: Auditbeat Unit Tests" command: | + set -euo pipefail cd auditbeat mage build unitTest agents: @@ -73,7 +74,7 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Windows 2016 Unit Tests" + context: "auditbeat: Win-2016 Unit Tests" - label: ":windows: Auditbeat Win-2022 Unit Tests" command: | @@ -90,10 +91,11 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Windows 2022 Unit Tests" + context: "auditbeat: Win-2022 Unit Tests" - label: ":linux: Auditbeat Crosscompile" command: | + set -euo pipefail make -C auditbeat crosscompile env: GOX_FLAGS: "-arch amd64" @@ -103,61 +105,104 @@ steps: machineType: "${GCP_HI_PERF_MACHINE_TYPE}" notify: - github_commit_status: - context: "auditbeat: Cross compile" + context: "auditbeat: Crosscompile" + + - group: "Auditbeat Extended Tests" + key: "auditbeat-extended-tests" + if: build.env("BUILDKITE_PULL_REQUEST") == "false" - - group: "Auditbeat Linux arm64 Tests" - key: "auditbeat-extended-tests-linux-arm64" - if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ steps: - - label: ":linux: Auditbeat Linux arm64 Unit Tests" + - label: ":linux: Auditbeat Ubuntu Integration Tests" + key: "auditbeat-extended-integ-tests" + command: | + set -euo pipefail + cd auditbeat + mage build integTest + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" + machineType: "${GCP_DEFAULT_MACHINE_TYPE}" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" + notify: + - github_commit_status: + context: "auditbeat: Linux Integration Tests" + + - label: ":linux: Auditbeat Linux ARM Integration Tests" + key: "auditbeat-extended-arm64-integ-tests" + if: build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ + command: | + set -euo pipefail + cd auditbeat + mage build integTest + agents: + provider: "aws" + imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" + instanceType: "${AWS_ARM_INSTANCE_TYPE}" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" + notify: + - github_commit_status: + context: "auditbeat: Linux ARM Integration Tests" + + - label: ":linux: Auditbeat Linux ARM Unit Tests" key: "auditbeat-extended-arm64-unit-tests" + if: build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ command: | set -euo pipefail cd auditbeat - mage unitTest + mage build unitTest agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" instanceType: "${AWS_ARM_INSTANCE_TYPE}" - artifact_paths: "auditbeat/build/*.*" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" notify: - github_commit_status: - context: "metricbeat: Linux arm64 tests" + context: "auditbeat: Linux ARM Unit Tests" - - group: "Auditbeat MacOS Extended" - if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ - steps: - - label: ":mac: Auditbeat macOS x86_64 Unit Tests" + - label: ":mac: Auditbeat MacOS Unit Tests" + if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ command: | set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat - mage unitTest + mage build unitTest agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" - artifact_paths: "auditbeat/build/*.*" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended MacOS x86_64 Unit Tests" + context: "auditbeat: MacOS Unit Tests" - - label: ":mac: Auditbeat macOS arm64 Unit Tests" + - label: ":mac: Auditbeat macOS ARM Unit Tests" + if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ command: | set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat - mage unitTest + mage build unitTest agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" - artifact_paths: "auditbeat/build/*.*" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended MacOS arm64 Unit Tests" + context: "auditbeat: MacOS ARM Unit Tests" - group: "Auditbeat Windows Extended Testing" key: "auditbeat-extended-tests-win" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/ + steps: - label: ":windows: Auditbeat Win-2019 Unit Tests" key: "auditbeat-extended-win-2019-unit-tests" @@ -170,10 +215,12 @@ steps: machine_type: "${GCP_WIN_MACHINE_TYPE}" disk_size: 100 disk_type: "pd-ssd" - artifact_paths: "auditbeat/build/*.*" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended Windows 2019 Unit Tests" + context: "auditbeat: Extended Win-2019 Unit Tests" - label: ":windows: Auditbeat Win-10 Unit Tests" key: "auditbeat-extended-win-10-unit-tests" @@ -186,12 +233,14 @@ steps: machine_type: "${GCP_WIN_MACHINE_TYPE}" disk_size: 100 disk_type: "pd-ssd" - artifact_paths: "auditbeat/build/*.*" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended Windows 10 Unit Tests" + context: "auditbeat: Extended Win-10 Unit Tests" - - label: ":windows: Auditbeat Win-11 Unit Tests" + - label: ":windows: Auditbeat Win 11 Unit Tests" key: "auditbeat-extended-win-11-unit-tests" command: | Set-Location -Path auditbeat @@ -202,10 +251,12 @@ steps: machine_type: "${GCP_WIN_MACHINE_TYPE}" disk_size: 100 disk_type: "pd-ssd" - artifact_paths: "auditbeat/build/*.*" + artifact_paths: + - "auditbeat/build/*.xml" + - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended Windows 11 Unit Tests" + context: "auditbeat: Extended Win 11 Unit Tests" - wait: ~ # with PRs, we want to run packaging only if mandatory tests succeed @@ -223,6 +274,7 @@ steps: PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64" SNAPSHOT: true command: | + set -euo pipefail cd auditbeat mage package agents: @@ -240,6 +292,7 @@ steps: PACKAGES: "docker" SNAPSHOT: true command: | + set -euo pipefail cd auditbeat mage package agents: From b947128c4b25a8f3d13965f4346096ffd7452db3 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Sat, 27 Apr 2024 12:09:08 +0300 Subject: [PATCH 02/16] added integrations label --- .buildkite/auditbeat/auditbeat-pipeline.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index ff5f0e5ca84..68f4591246c 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -23,7 +23,7 @@ env: ASDF_MAGE_VERSION: 1.15.0 steps: - - group: "Auditbeat Mandatory Testing " + - group: "Auditbeat Mandatory Testing" key: "auditbeat-mandatory-tests" steps: @@ -109,11 +109,12 @@ steps: - group: "Auditbeat Extended Tests" key: "auditbeat-extended-tests" - if: build.env("BUILDKITE_PULL_REQUEST") == "false" + if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*(macOS|arm|integrations).*/ steps: - label: ":linux: Auditbeat Ubuntu Integration Tests" key: "auditbeat-extended-integ-tests" + if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*integrations.*/ command: | set -euo pipefail cd auditbeat @@ -131,7 +132,7 @@ steps: - label: ":linux: Auditbeat Linux ARM Integration Tests" key: "auditbeat-extended-arm64-integ-tests" - if: build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ + if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*integrations.*/ command: | set -euo pipefail cd auditbeat @@ -149,7 +150,7 @@ steps: - label: ":linux: Auditbeat Linux ARM Unit Tests" key: "auditbeat-extended-arm64-unit-tests" - if: build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ + if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ command: | set -euo pipefail cd auditbeat @@ -166,7 +167,7 @@ steps: context: "auditbeat: Linux ARM Unit Tests" - label: ":mac: Auditbeat MacOS Unit Tests" - if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ + if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ command: | set -euo pipefail source .buildkite/scripts/install_macos_tools.sh @@ -182,8 +183,8 @@ steps: - github_commit_status: context: "auditbeat: MacOS Unit Tests" - - label: ":mac: Auditbeat macOS ARM Unit Tests" - if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ + - label: ":mac: Auditbeat MacOS ARM Unit Tests" + if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ command: | set -euo pipefail source .buildkite/scripts/install_macos_tools.sh From d81f15fd008ca4067b7de018be055573b89d6e55 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Tue, 30 Apr 2024 13:00:19 +0300 Subject: [PATCH 03/16] updated pre-command --- .buildkite/hooks/pre-command | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 2abf56684a3..870ece78925 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -11,7 +11,7 @@ PRIVATE_CI_GCS_CREDENTIALS_PATH="kv/ci-shared/platform-ingest/gcp-platform-inges DOCKER_REGISTRY_SECRET_PATH="kv/ci-shared/platform-ingest/docker_registry_prod" GITHUB_TOKEN_VAULT_PATH="kv/ci-shared/platform-ingest/github_token" -if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats" || "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" ]]; then +if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats" || "$BUILDKITE_PIPELINE_SLUG" == "filebeat" ]]; then source .buildkite/env-scripts/env.sh if [[ -z "${GO_VERSION-""}" ]]; then export GO_VERSION=$(cat "${WORKSPACE}/.go-version") From 46d9f46d4138fda53b529e6dc0f663e60e63f020 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Wed, 1 May 2024 00:41:14 +0300 Subject: [PATCH 04/16] disabled monitor test on macos buildkite --- auditbeat/module/file_integrity/fileinfo_test.go | 2 +- auditbeat/module/file_integrity/monitor/monitor_test.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/auditbeat/module/file_integrity/fileinfo_test.go b/auditbeat/module/file_integrity/fileinfo_test.go index 4aa63d0a400..ec6bd052aa4 100644 --- a/auditbeat/module/file_integrity/fileinfo_test.go +++ b/auditbeat/module/file_integrity/fileinfo_test.go @@ -157,6 +157,6 @@ func TestSetUIDSetGIDBits(t *testing.T) { func skipOnBuildkiteDarwin(t testing.TB, reason string) { if os.Getenv("BUILDKITE") == "true" && runtime.GOOS == "darwin" { - t.Skip("Skip test on Buildkite MacOS: Wheel permission while expected staff") + t.Skip(reason) } } diff --git a/auditbeat/module/file_integrity/monitor/monitor_test.go b/auditbeat/module/file_integrity/monitor/monitor_test.go index 2f66d6469b2..8f4ef23226b 100644 --- a/auditbeat/module/file_integrity/monitor/monitor_test.go +++ b/auditbeat/module/file_integrity/monitor/monitor_test.go @@ -144,6 +144,9 @@ func TestRecursiveSubdirPermissions(t *testing.T) { t.Skip("Skipping permissions test on Windows") } + // Can be removed after https://github.com/elastic/ingest-dev/issues/3268 is solved + skipOnBuildkiteDarwin(t, "TMP dir issue on MacOS") + if os.Getuid() == 0 { t.Skip("skipping as root can access every file and thus this unittest will fail") return @@ -429,3 +432,9 @@ func assertNoError(t *testing.T, err error) { t.Fatal(err) } } + +func skipOnBuildkiteDarwin(t testing.TB, reason string) { + if os.Getenv("BUILDKITE") == "true" && runtime.GOOS == "darwin" { + t.Skip(reason) + } +} From 3599a175c0c87e8c9455b4bd3660cb92fc3fa7c9 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Wed, 1 May 2024 11:49:06 +0300 Subject: [PATCH 05/16] disabled file integrity tests with timeout err --- auditbeat/tests/system/test_file_integrity.py | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/auditbeat/tests/system/test_file_integrity.py b/auditbeat/tests/system/test_file_integrity.py index 64062dd0a77..9c234752984 100644 --- a/auditbeat/tests/system/test_file_integrity.py +++ b/auditbeat/tests/system/test_file_integrity.py @@ -1,9 +1,12 @@ -import os import time import unittest import platform from auditbeat import * +import platform +import time +import unittest +from auditbeat import * if platform.platform().split('-')[0] == 'Linux': import pwd @@ -79,6 +82,20 @@ def wrap_except(expr): return False +def is_ubuntu_x86_64(): + if platform.system() == 'Ubuntu' in platform.platform(): + if platform.machine() == "x86_64": + return True + return False + + +def is_ubuntu_arm(): + if platform.system() == 'Ubuntu' in platform.platform(): + if platform.machine() == "aarch64": + return True + return False + + class Test(BaseTest): def wait_output(self, min_events): self.wait_until(lambda: wrap_except(lambda: len(self.read_output()) >= min_events)) @@ -194,11 +211,14 @@ def test_non_recursive__fsnotify(self): self._test_non_recursive("fsnotify") @unittest.skipUnless(is_root(), "Requires root") + @unittest.skipIf(is_ubuntu_x86_64(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") + @unittest.skipIf(is_ubuntu_arm(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_non_recursive__ebpf(self): self._test_non_recursive("ebpf") @unittest.skipUnless(is_platform_supported(), "Requires Linux 3.10.0+ and arm64/amd64 arch") @unittest.skipUnless(is_root(), "Requires root") + @unittest.skipIf(is_ubuntu_x86_64(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_non_recursive__kprobes(self): self._test_non_recursive("kprobes") @@ -274,11 +294,14 @@ def test_recursive__fsnotify(self): self._test_recursive("fsnotify") @unittest.skipUnless(is_root(), "Requires root") + @unittest.skipIf(is_ubuntu_x86_64(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") + @unittest.skipIf(is_ubuntu_arm(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_recursive__ebpf(self): self._test_recursive("ebpf") @unittest.skipUnless(is_platform_supported(), "Requires Linux 3.10.0+ and arm64/amd64 arch") @unittest.skipUnless(is_root(), "Requires root") + @unittest.skipIf(is_ubuntu_x86_64, "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_recursive__kprobes(self): self._test_recursive("kprobes") @@ -350,5 +373,6 @@ def test_file_modified__ebpf(self): @unittest.skipUnless(is_platform_supported(), "Requires Linux 3.10.0+ and arm64/amd64 arch") @unittest.skipUnless(is_root(), "Requires root") + @unittest.skipIf(is_ubuntu_x86_64, "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_file_modified__kprobes(self): self._test_file_modified("kprobes") From badd99e0aefe0347678ac7da13570049936637a5 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 11:44:33 +0300 Subject: [PATCH 06/16] revert test changes --- auditbeat/module/file_integrity/fileinfo_test.go | 2 +- auditbeat/module/file_integrity/monitor/monitor_test.go | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/auditbeat/module/file_integrity/fileinfo_test.go b/auditbeat/module/file_integrity/fileinfo_test.go index ec6bd052aa4..4aa63d0a400 100644 --- a/auditbeat/module/file_integrity/fileinfo_test.go +++ b/auditbeat/module/file_integrity/fileinfo_test.go @@ -157,6 +157,6 @@ func TestSetUIDSetGIDBits(t *testing.T) { func skipOnBuildkiteDarwin(t testing.TB, reason string) { if os.Getenv("BUILDKITE") == "true" && runtime.GOOS == "darwin" { - t.Skip(reason) + t.Skip("Skip test on Buildkite MacOS: Wheel permission while expected staff") } } diff --git a/auditbeat/module/file_integrity/monitor/monitor_test.go b/auditbeat/module/file_integrity/monitor/monitor_test.go index 8f4ef23226b..2f66d6469b2 100644 --- a/auditbeat/module/file_integrity/monitor/monitor_test.go +++ b/auditbeat/module/file_integrity/monitor/monitor_test.go @@ -144,9 +144,6 @@ func TestRecursiveSubdirPermissions(t *testing.T) { t.Skip("Skipping permissions test on Windows") } - // Can be removed after https://github.com/elastic/ingest-dev/issues/3268 is solved - skipOnBuildkiteDarwin(t, "TMP dir issue on MacOS") - if os.Getuid() == 0 { t.Skip("skipping as root can access every file and thus this unittest will fail") return @@ -432,9 +429,3 @@ func assertNoError(t *testing.T, err error) { t.Fatal(err) } } - -func skipOnBuildkiteDarwin(t testing.TB, reason string) { - if os.Getenv("BUILDKITE") == "true" && runtime.GOOS == "darwin" { - t.Skip(reason) - } -} From 666f532c4b92b318603ce6f7b236ee30d070ce9d Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 11:49:54 +0300 Subject: [PATCH 07/16] Label/context fixes to pipeline --- .buildkite/auditbeat/auditbeat-pipeline.yml | 37 ++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index 68f4591246c..76837671d2a 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -59,7 +59,7 @@ steps: - github_commit_status: context: "auditbeat: RHEL Unit Tests" - - label: ":windows: Auditbeat Win-2016 Unit Tests" + - label: ":windows: Auditbeat Windows 2016 Unit Tests" command: | Set-Location -Path auditbeat mage build unitTest @@ -74,9 +74,9 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Win-2016 Unit Tests" + context: "auditbeat: Windows 2016 Unit Tests" - - label: ":windows: Auditbeat Win-2022 Unit Tests" + - label: ":windows: Auditbeat Windows 2022 Unit Tests" command: | Set-Location -Path auditbeat mage build unitTest @@ -91,11 +91,10 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Win-2022 Unit Tests" + context: "auditbeat: Windows 2022 Unit Tests" - label: ":linux: Auditbeat Crosscompile" command: | - set -euo pipefail make -C auditbeat crosscompile env: GOX_FLAGS: "-arch amd64" @@ -130,7 +129,7 @@ steps: - github_commit_status: context: "auditbeat: Linux Integration Tests" - - label: ":linux: Auditbeat Linux ARM Integration Tests" + - label: ":linux: Auditbeat Ubuntu arm64 Integration Tests" key: "auditbeat-extended-arm64-integ-tests" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*integrations.*/ command: | @@ -146,9 +145,9 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Linux ARM Integration Tests" + context: "auditbeat: Linux arm64 Integration Tests" - - label: ":linux: Auditbeat Linux ARM Unit Tests" + - label: ":linux: Auditbeat Ubuntu arm64 Unit Tests" key: "auditbeat-extended-arm64-unit-tests" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ command: | @@ -164,9 +163,9 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Linux ARM Unit Tests" + context: "auditbeat: Linux arm64 Unit Tests" - - label: ":mac: Auditbeat MacOS Unit Tests" + - label: ":mac: Auditbeat macOS x86_64 Unit Tests" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ command: | set -euo pipefail @@ -181,9 +180,9 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: MacOS Unit Tests" + context: "auditbeat: macOS x86_64 Unit Tests" - - label: ":mac: Auditbeat MacOS ARM Unit Tests" + - label: ":mac: Auditbeat macOS arm64 ARM Unit Tests" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ command: | set -euo pipefail @@ -198,14 +197,14 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: MacOS ARM Unit Tests" + context: "auditbeat: macOS arm64 Unit Tests" - group: "Auditbeat Windows Extended Testing" key: "auditbeat-extended-tests-win" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/ steps: - - label: ":windows: Auditbeat Win-2019 Unit Tests" + - label: ":windows: Auditbeat Windows 2019 Unit Tests" key: "auditbeat-extended-win-2019-unit-tests" command: | Set-Location -Path auditbeat @@ -221,9 +220,9 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended Win-2019 Unit Tests" + context: "auditbeat: Extended Windows 2019 Unit Tests" - - label: ":windows: Auditbeat Win-10 Unit Tests" + - label: ":windows: Auditbeat Windows 10 Unit Tests" key: "auditbeat-extended-win-10-unit-tests" command: | Set-Location -Path auditbeat @@ -239,9 +238,9 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended Win-10 Unit Tests" + context: "auditbeat: Extended Windows 10 Unit Tests" - - label: ":windows: Auditbeat Win 11 Unit Tests" + - label: ":windows: Auditbeat Windows 11 Unit Tests" key: "auditbeat-extended-win-11-unit-tests" command: | Set-Location -Path auditbeat @@ -257,7 +256,7 @@ steps: - "auditbeat/build/*.json" notify: - github_commit_status: - context: "auditbeat: Extended Win 11 Unit Tests" + context: "auditbeat: Extended Windows 11 Unit Tests" - wait: ~ # with PRs, we want to run packaging only if mandatory tests succeed From fa5f500b46665079adab998e3121e7cde8b23fa1 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 11:53:53 +0300 Subject: [PATCH 08/16] revert test fixes --- auditbeat/tests/system/test_file_integrity.py | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/auditbeat/tests/system/test_file_integrity.py b/auditbeat/tests/system/test_file_integrity.py index 9c234752984..64062dd0a77 100644 --- a/auditbeat/tests/system/test_file_integrity.py +++ b/auditbeat/tests/system/test_file_integrity.py @@ -1,12 +1,9 @@ +import os import time import unittest import platform from auditbeat import * -import platform -import time -import unittest -from auditbeat import * if platform.platform().split('-')[0] == 'Linux': import pwd @@ -82,20 +79,6 @@ def wrap_except(expr): return False -def is_ubuntu_x86_64(): - if platform.system() == 'Ubuntu' in platform.platform(): - if platform.machine() == "x86_64": - return True - return False - - -def is_ubuntu_arm(): - if platform.system() == 'Ubuntu' in platform.platform(): - if platform.machine() == "aarch64": - return True - return False - - class Test(BaseTest): def wait_output(self, min_events): self.wait_until(lambda: wrap_except(lambda: len(self.read_output()) >= min_events)) @@ -211,14 +194,11 @@ def test_non_recursive__fsnotify(self): self._test_non_recursive("fsnotify") @unittest.skipUnless(is_root(), "Requires root") - @unittest.skipIf(is_ubuntu_x86_64(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") - @unittest.skipIf(is_ubuntu_arm(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_non_recursive__ebpf(self): self._test_non_recursive("ebpf") @unittest.skipUnless(is_platform_supported(), "Requires Linux 3.10.0+ and arm64/amd64 arch") @unittest.skipUnless(is_root(), "Requires root") - @unittest.skipIf(is_ubuntu_x86_64(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_non_recursive__kprobes(self): self._test_non_recursive("kprobes") @@ -294,14 +274,11 @@ def test_recursive__fsnotify(self): self._test_recursive("fsnotify") @unittest.skipUnless(is_root(), "Requires root") - @unittest.skipIf(is_ubuntu_x86_64(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") - @unittest.skipIf(is_ubuntu_arm(), "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_recursive__ebpf(self): self._test_recursive("ebpf") @unittest.skipUnless(is_platform_supported(), "Requires Linux 3.10.0+ and arm64/amd64 arch") @unittest.skipUnless(is_root(), "Requires root") - @unittest.skipIf(is_ubuntu_x86_64, "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_recursive__kprobes(self): self._test_recursive("kprobes") @@ -373,6 +350,5 @@ def test_file_modified__ebpf(self): @unittest.skipUnless(is_platform_supported(), "Requires Linux 3.10.0+ and arm64/amd64 arch") @unittest.skipUnless(is_root(), "Requires root") - @unittest.skipIf(is_ubuntu_x86_64, "Timeout error on Buildkite - https://github.com/elastic/ingest-dev/issues/3270") def test_file_modified__kprobes(self): self._test_file_modified("kprobes") From 6eb9344ce767761ac84ab8118deb88403a85a73a Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 11:56:20 +0300 Subject: [PATCH 09/16] revert unnecessary changes --- .buildkite/auditbeat/auditbeat-pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index 76837671d2a..7aaa8b7019d 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -59,7 +59,7 @@ steps: - github_commit_status: context: "auditbeat: RHEL Unit Tests" - - label: ":windows: Auditbeat Windows 2016 Unit Tests" + - label: ":windows: Auditbeat Win-2016 Unit Tests" command: | Set-Location -Path auditbeat mage build unitTest @@ -76,7 +76,7 @@ steps: - github_commit_status: context: "auditbeat: Windows 2016 Unit Tests" - - label: ":windows: Auditbeat Windows 2022 Unit Tests" + - label: ":windows: Auditbeat Win-2022 Unit Tests" command: | Set-Location -Path auditbeat mage build unitTest @@ -204,7 +204,7 @@ steps: if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/ steps: - - label: ":windows: Auditbeat Windows 2019 Unit Tests" + - label: ":windows: Auditbeat Win-2019 Unit Tests" key: "auditbeat-extended-win-2019-unit-tests" command: | Set-Location -Path auditbeat @@ -222,7 +222,7 @@ steps: - github_commit_status: context: "auditbeat: Extended Windows 2019 Unit Tests" - - label: ":windows: Auditbeat Windows 10 Unit Tests" + - label: ":windows: Auditbeat Win-10 Unit Tests" key: "auditbeat-extended-win-10-unit-tests" command: | Set-Location -Path auditbeat @@ -240,7 +240,7 @@ steps: - github_commit_status: context: "auditbeat: Extended Windows 10 Unit Tests" - - label: ":windows: Auditbeat Windows 11 Unit Tests" + - label: ":windows: Auditbeat Win-11 Unit Tests" key: "auditbeat-extended-win-11-unit-tests" command: | Set-Location -Path auditbeat From 907f94a7134562b42b6cfd6d4639e19c239bcf25 Mon Sep 17 00:00:00 2001 From: Panos Koutsovasilis Date: Thu, 2 May 2024 10:39:07 +0300 Subject: [PATCH 10/16] fix(auditbeat/fim/kprobes): check correctly with "fsnotify_nameremove" fix(auditbeat/fim/kprobes): allow appropriate syscalls for seccomp/apparmor policies fix(tests/system): remove check on absent key of the event --- .../kprobes/probes_fsnotify_nameremove.go | 2 +- .../file_integrity/kprobes/seccomp_linux.go | 31 +++++++++++++++++++ auditbeat/tests/system/test_file_integrity.py | 1 - 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 auditbeat/module/file_integrity/kprobes/seccomp_linux.go diff --git a/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go b/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go index ecabb94c7d2..47fc5df9f0a 100644 --- a/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go +++ b/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go @@ -35,7 +35,7 @@ func loadFsNotifyNameRemoveSymbol(s *probeManager) error { if err != nil { if errors.Is(err, ErrSymbolNotFound) { s.buildChecks = append(s.buildChecks, func(spec *tkbtf.Spec) bool { - return !spec.ContainsSymbol(symbolInfo.symbolName) + return !spec.ContainsSymbol("fsnotify_nameremove") }) return nil } diff --git a/auditbeat/module/file_integrity/kprobes/seccomp_linux.go b/auditbeat/module/file_integrity/kprobes/seccomp_linux.go new file mode 100644 index 00000000000..8c8b211c10b --- /dev/null +++ b/auditbeat/module/file_integrity/kprobes/seccomp_linux.go @@ -0,0 +1,31 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package kprobes + +import ( + "runtime" + + "github.com/elastic/beats/v7/libbeat/common/seccomp" +) + +func init() { + switch runtime.GOARCH { + case "amd64", "386", "arm64": + // The module/file_integrity with kprobes BE uses additional syscalls + if err := seccomp.ModifyDefaultPolicy(seccomp.AddSyscall, + "eventfd2", // required by auditbeat/tracing + "mount", // required by auditbeat/tracing + "perf_event_open", // required by auditbeat/tracing + "ppoll", // required by auditbeat/tracing + "umount2", // required by auditbeat/tracing + "truncate", // required during kprobes verification + "utime", // required during kprobes verification + "utimensat", // required during kprobes verification + "setxattr", // required during kprobes verification + ); err != nil { + panic(err) + } + } +} diff --git a/auditbeat/tests/system/test_file_integrity.py b/auditbeat/tests/system/test_file_integrity.py index 64062dd0a77..c82f3187a60 100644 --- a/auditbeat/tests/system/test_file_integrity.py +++ b/auditbeat/tests/system/test_file_integrity.py @@ -108,7 +108,6 @@ def _assert_process_data(self, event, backend): if backend != "ebpf": return assert event["process.entity_id"] != "" - assert event["process.executable"] == "pytest" assert event["process.pid"] == os.getpid() assert int(event["process.user.id"]) == os.geteuid() assert event["process.user.name"] == pwd.getpwuid(os.geteuid()).pw_name From e985f41e41401344077d76064e5f02a2b29bc341 Mon Sep 17 00:00:00 2001 From: Olga Naydyonock Date: Wed, 1 May 2024 23:04:45 +0300 Subject: [PATCH 11/16] Enabling retries for Beats flaky tests (#39174) --- .buildkite/auditbeat/auditbeat-pipeline.yml | 41 +++++++++++++++++++ .buildkite/filebeat/filebeat-pipeline.yml | 33 +++++++++++++++ .buildkite/heartbeat/heartbeat-pipeline.yml | 36 ++++++++++++++++ .buildkite/libbeat/pipeline.libbeat.yml | 18 ++++++++ .buildkite/metricbeat/pipeline.yml | 33 +++++++++++++++ .buildkite/packetbeat/pipeline.packetbeat.yml | 30 ++++++++++++++ .buildkite/winlogbeat/pipeline.winlogbeat.yml | 18 ++++++++ .../x-pack/pipeline.xpack.auditbeat.yml | 30 ++++++++++++++ .../x-pack/pipeline.xpack.dockerlogbeat.yml | 6 +++ .buildkite/x-pack/pipeline.xpack.filebeat.yml | 33 +++++++++++++++ .../x-pack/pipeline.xpack.heartbeat.yml | 29 ++++++++++++- .buildkite/x-pack/pipeline.xpack.libbeat.yml | 27 ++++++++++++ .../x-pack/pipeline.xpack.metricbeat.yml | 30 ++++++++++++++ .../x-pack/pipeline.xpack.osquerybeat.yml | 27 ++++++++++++ .../x-pack/pipeline.xpack.packetbeat.yml | 39 ++++++++++++++++++ .../x-pack/pipeline.xpack.winlogbeat.yml | 18 ++++++++ 16 files changed, 447 insertions(+), 1 deletion(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index 7aaa8b7019d..026fb922e6d 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -32,6 +32,9 @@ steps: set -euo pipefail cd auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -48,6 +51,9 @@ steps: set -euo pipefail cd auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9}" @@ -63,6 +69,9 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -80,6 +89,9 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -98,6 +110,9 @@ steps: make -C auditbeat crosscompile env: GOX_FLAGS: "-arch amd64" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -136,6 +151,9 @@ steps: set -euo pipefail cd auditbeat mage build integTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -171,7 +189,14 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat +<<<<<<< HEAD mage build unitTest +======= + mage unitTest + retry: + automatic: + - limit: 3 +>>>>>>> 02ea29d8cf (Enabling retries for Beats flaky tests (#39174)) agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -188,7 +213,14 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat +<<<<<<< HEAD mage build unitTest +======= + mage unitTest + retry: + automatic: + - limit: 3 +>>>>>>> 02ea29d8cf (Enabling retries for Beats flaky tests (#39174)) agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -209,6 +241,9 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -227,6 +262,9 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -245,6 +283,9 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" diff --git a/.buildkite/filebeat/filebeat-pipeline.yml b/.buildkite/filebeat/filebeat-pipeline.yml index 7eedd9d76fb..053e8dbec41 100644 --- a/.buildkite/filebeat/filebeat-pipeline.yml +++ b/.buildkite/filebeat/filebeat-pipeline.yml @@ -30,6 +30,9 @@ steps: command: | cd filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -45,6 +48,9 @@ steps: command: | cd filebeat mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -60,6 +66,9 @@ steps: command: | cd filebeat mage pythonIntegTest + retry: + automatic: + - limit: 3 agents: provider: gcp image: "${IMAGE_UBUNTU_X86_64}" @@ -76,6 +85,9 @@ steps: command: | Set-Location -Path filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -94,6 +106,9 @@ steps: command: | Set-Location -Path filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -118,6 +133,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -136,6 +154,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -152,6 +173,9 @@ steps: command: | cd filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -172,6 +196,9 @@ steps: command: | Set-Location -Path filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -190,6 +217,9 @@ steps: command: | Set-Location -Path filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -208,6 +238,9 @@ steps: command: | Set-Location -Path filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index 8091b2eead1..cadbcec1eca 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -30,6 +30,9 @@ steps: command: | cd heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -45,6 +48,9 @@ steps: command: | cd heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9}" @@ -61,6 +67,9 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -78,6 +87,9 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -94,6 +106,9 @@ steps: command: | cd heartbeat mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -109,6 +124,9 @@ steps: command: | cd heartbeat mage pythonIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -130,6 +148,9 @@ steps: command: | cd heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -151,6 +172,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -168,6 +192,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -188,6 +215,9 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -205,6 +235,9 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -222,6 +255,9 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" diff --git a/.buildkite/libbeat/pipeline.libbeat.yml b/.buildkite/libbeat/pipeline.libbeat.yml index 040ad9b1d66..bc77712c330 100644 --- a/.buildkite/libbeat/pipeline.libbeat.yml +++ b/.buildkite/libbeat/pipeline.libbeat.yml @@ -21,6 +21,9 @@ steps: set -euo pipefail cd libbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -38,6 +41,9 @@ steps: set -euo pipefail cd libbeat mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -55,6 +61,9 @@ steps: set -euo pipefail cd libbeat mage pythonIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -72,6 +81,9 @@ steps: set -euo pipefail cd libbeat make crosscompile + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -89,6 +101,9 @@ steps: set -euo pipefail cd libbeat make STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' GOTEST_OUTPUT_OPTIONS=' | go-junit-report > libbeat-stress-test.xml' stress-tests + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -108,6 +123,9 @@ steps: set -euo pipefail cd libbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/metricbeat/pipeline.yml b/.buildkite/metricbeat/pipeline.yml index 1fb6bfcc237..d15212d2ef3 100644 --- a/.buildkite/metricbeat/pipeline.yml +++ b/.buildkite/metricbeat/pipeline.yml @@ -32,6 +32,9 @@ steps: - label: ":linux: Ubuntu Unit Tests" key: "mandatory-linux-unit-test" command: "cd metricbeat && mage build unitTest" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -62,6 +65,9 @@ steps: echo "~~~ Running tests" export KUBECONFIG="$$PWD/kubecfg" cd metricbeat && mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -92,6 +98,9 @@ steps: echo "~~~ Running tests" export KUBECONFIG="$$PWD/kubecfg" cd metricbeat && mage pythonIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -106,6 +115,9 @@ steps: - label: ":negative_squared_cross_mark: Cross compile" key: "mandatory-cross-compile" command: "make -C metricbeat crosscompile" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -122,6 +134,9 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -140,6 +155,9 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -162,6 +180,9 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -180,6 +201,9 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -198,6 +222,9 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -221,6 +248,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd metricbeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -238,6 +268,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd metricbeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/packetbeat/pipeline.packetbeat.yml b/.buildkite/packetbeat/pipeline.packetbeat.yml index c0f5c1e1a73..d510107a89c 100644 --- a/.buildkite/packetbeat/pipeline.packetbeat.yml +++ b/.buildkite/packetbeat/pipeline.packetbeat.yml @@ -28,6 +28,9 @@ steps: command: | cd packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -43,6 +46,9 @@ steps: command: | cd packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9_X86_64}" @@ -58,6 +64,9 @@ steps: command: | Set-Location -Path packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -75,6 +84,9 @@ steps: command: | Set-Location -Path packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -96,6 +108,9 @@ steps: command: | Set-Location -Path packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -114,6 +129,9 @@ steps: Set-Location -Path packetbeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -132,6 +150,9 @@ steps: Set-Location -Path packetbeat mage build unitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -156,6 +177,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -174,6 +198,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -188,6 +215,9 @@ steps: key: "linux-arm64-unit-tests-extended" command: "cd packetbeat && mage build unitTest" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/winlogbeat/pipeline.winlogbeat.yml b/.buildkite/winlogbeat/pipeline.winlogbeat.yml index c71858b45b0..ff332791349 100644 --- a/.buildkite/winlogbeat/pipeline.winlogbeat.yml +++ b/.buildkite/winlogbeat/pipeline.winlogbeat.yml @@ -24,6 +24,9 @@ steps: - label: ":ubuntu: Winlogbeat Crossccompile" key: "mandatory-cross-compile" command: "make -C winlogbeat crosscompile" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -40,6 +43,9 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -58,6 +64,9 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "mandatory-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -76,6 +85,9 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -99,6 +111,9 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -117,6 +132,9 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" diff --git a/.buildkite/x-pack/pipeline.xpack.auditbeat.yml b/.buildkite/x-pack/pipeline.xpack.auditbeat.yml index 36fcb9bebd9..80c298c725d 100644 --- a/.buildkite/x-pack/pipeline.xpack.auditbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.auditbeat.yml @@ -36,6 +36,9 @@ steps: echo "~~~ Will run tests with env var MODULE=$$MODULE" cd x-pack/auditbeat mage update build test + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -52,6 +55,9 @@ steps: command: | cd x-pack/auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9_X86_64}" @@ -68,6 +74,9 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -86,6 +95,9 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -108,6 +120,9 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -126,6 +141,9 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -144,6 +162,9 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -167,6 +188,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -183,6 +207,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -201,6 +228,9 @@ steps: command: | cd x-pack/auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml b/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml index 05aee81e4d8..a64f7851913 100644 --- a/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml @@ -28,6 +28,9 @@ steps: - label: ":ubuntu: Xpack/Dockerlogbeat Ubuntu Unit Tests" key: "mandatory-linux-unit-test" command: "cd x-pack/dockerlogbeat && mage build unitTest" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -44,6 +47,9 @@ steps: command: "cd x-pack/dockerlogbeat && mage goIntegTest" env: MODULE: $MODULE + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" diff --git a/.buildkite/x-pack/pipeline.xpack.filebeat.yml b/.buildkite/x-pack/pipeline.xpack.filebeat.yml index 795302bc2d9..b7e71e3c3c0 100644 --- a/.buildkite/x-pack/pipeline.xpack.filebeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.filebeat.yml @@ -30,6 +30,9 @@ steps: command: | cd x-pack/filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -50,6 +53,9 @@ steps: defineModuleFromTheChangeSet x-pack/filebeat echo "~~~ Will run tests with env var MODULE=$$MODULE" cd x-pack/filebeat && mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -70,6 +76,9 @@ steps: defineModuleFromTheChangeSet x-pack/filebeat echo "~~~ Running tests with env var MODULE=$$MODULE" cd x-pack/filebeat && mage pythonIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -86,6 +95,9 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -104,6 +116,9 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -122,6 +137,9 @@ steps: command: | cd x-pack/filebeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" @@ -142,6 +160,9 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -160,6 +181,9 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -178,6 +202,9 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -200,6 +227,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/filebeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -217,6 +247,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/filebeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.heartbeat.yml b/.buildkite/x-pack/pipeline.xpack.heartbeat.yml index 107dfa65f1b..136706e698c 100644 --- a/.buildkite/x-pack/pipeline.xpack.heartbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.heartbeat.yml @@ -39,6 +39,9 @@ steps: echo "~~~ Running tests" cd x-pack/heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -59,6 +62,9 @@ steps: echo "~~~ Running tests" cd x-pack/heartbeat mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -76,6 +82,9 @@ steps: command: | Set-Location -Path x-pack/heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -95,6 +104,9 @@ steps: command: | Set-Location -Path x-pack/heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -118,6 +130,9 @@ steps: Set-Location -Path x-pack/heartbeat mage build test key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -136,6 +151,9 @@ steps: Set-Location -Path x-pack/heartbeat mage build test key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -153,6 +171,9 @@ steps: command: | Set-Location -Path x-pack/heartbeat mage build test + retry: + automatic: + - limit: 3 key: "extended-win-2019-unit-tests" agents: provider: "gcp" @@ -166,7 +187,7 @@ steps: notify: - github_commit_status: context: "x-pack/heartbeat: Windows 2019 Unit Tests" - + - group: "x-pack/heartbeat MacOS Extended Tests" key: "x-pack-heartbeat-extended-tests-macos" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ @@ -179,6 +200,9 @@ steps: installNodeJsDependencies cd x-pack/heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -197,6 +221,9 @@ steps: installNodeJsDependencies cd x-pack/heartbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.libbeat.yml b/.buildkite/x-pack/pipeline.xpack.libbeat.yml index 14316a3ecd7..6bf456f6d83 100644 --- a/.buildkite/x-pack/pipeline.xpack.libbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.libbeat.yml @@ -26,6 +26,9 @@ steps: command: | cd x-pack/libbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -42,6 +45,9 @@ steps: command: | cd x-pack/libbeat mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -58,6 +64,9 @@ steps: command: | cd x-pack/libbeat mage pythonIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -74,6 +83,9 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -92,6 +104,9 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -114,6 +129,9 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -132,6 +150,9 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -150,6 +171,9 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -172,6 +196,9 @@ steps: command: | cd x-pack/libbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/x-pack/pipeline.xpack.metricbeat.yml b/.buildkite/x-pack/pipeline.xpack.metricbeat.yml index 317b9069c55..4c1c31521f9 100644 --- a/.buildkite/x-pack/pipeline.xpack.metricbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.metricbeat.yml @@ -30,6 +30,9 @@ steps: command: | cd x-pack/metricbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -50,6 +53,9 @@ steps: defineModuleFromTheChangeSet x-pack/metricbeat echo "~~~ Will run tests with env var MODULE=$$MODULE" cd x-pack/metricbeat && mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -70,6 +76,9 @@ steps: defineModuleFromTheChangeSet x-pack/metricbeat echo "~~~ Running tests with env var MODULE=$$MODULE" cd x-pack/metricbeat && mage pythonIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -86,6 +95,9 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -104,6 +116,9 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -126,6 +141,9 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -144,6 +162,9 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -162,6 +183,9 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -185,6 +209,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/metricbeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -202,6 +229,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/metricbeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml b/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml index 8c9137cb423..c8ecac79735 100644 --- a/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml @@ -30,6 +30,9 @@ steps: command: | cd x-pack/osquerybeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -46,6 +49,9 @@ steps: command: | cd x-pack/osquerybeat mage goIntegTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -62,6 +68,9 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -80,6 +89,9 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -102,6 +114,9 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -120,6 +135,9 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -138,6 +156,9 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -160,6 +181,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/osquerybeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -175,6 +199,9 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/osquerybeat && mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.packetbeat.yml b/.buildkite/x-pack/pipeline.xpack.packetbeat.yml index 77fdf2af848..1ab71c30d7d 100644 --- a/.buildkite/x-pack/pipeline.xpack.packetbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.packetbeat.yml @@ -29,6 +29,9 @@ steps: command: | cd x-pack/packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -45,6 +48,9 @@ steps: command: | cd x-pack/packetbeat mage systemTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -61,6 +67,9 @@ steps: command: | cd x-pack/packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9_X86_64}" @@ -77,6 +86,9 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -95,6 +107,9 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -114,6 +129,9 @@ steps: command: | Set-Location -Path x-pack/packetbeat mage systemTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -136,6 +154,9 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -154,6 +175,9 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -172,6 +196,9 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -191,6 +218,9 @@ steps: command: | Set-Location -Path x-pack/packetbeat mage systemTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -214,6 +244,9 @@ steps: cd x-pack/packetbeat mage build unitTest if: build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" @@ -236,6 +269,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -253,6 +289,9 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/packetbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml b/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml index c07e537adf0..c6b5a6f59fe 100644 --- a/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml @@ -29,6 +29,9 @@ steps: mage build unitTest env: MODULE: $MODULE + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -47,6 +50,9 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "mandatory-win-2016-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -65,6 +71,9 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "mandatory-win-2022-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -88,6 +97,9 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "extended-win-10-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -106,6 +118,9 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "extended-win-11-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -124,6 +139,9 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "extended-win-2019-unit-tests" + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" From 78979538d711c5da08ee7d847baba0dfd0e12017 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 12:11:04 +0300 Subject: [PATCH 12/16] Revert "Enabling retries for Beats flaky tests (#39174)" This reverts commit e985f41e41401344077d76064e5f02a2b29bc341. --- .buildkite/auditbeat/auditbeat-pipeline.yml | 41 ------------------- .buildkite/filebeat/filebeat-pipeline.yml | 33 --------------- .buildkite/heartbeat/heartbeat-pipeline.yml | 36 ---------------- .buildkite/libbeat/pipeline.libbeat.yml | 18 -------- .buildkite/metricbeat/pipeline.yml | 33 --------------- .buildkite/packetbeat/pipeline.packetbeat.yml | 30 -------------- .buildkite/winlogbeat/pipeline.winlogbeat.yml | 18 -------- .../x-pack/pipeline.xpack.auditbeat.yml | 30 -------------- .../x-pack/pipeline.xpack.dockerlogbeat.yml | 6 --- .buildkite/x-pack/pipeline.xpack.filebeat.yml | 33 --------------- .../x-pack/pipeline.xpack.heartbeat.yml | 29 +------------ .buildkite/x-pack/pipeline.xpack.libbeat.yml | 27 ------------ .../x-pack/pipeline.xpack.metricbeat.yml | 30 -------------- .../x-pack/pipeline.xpack.osquerybeat.yml | 27 ------------ .../x-pack/pipeline.xpack.packetbeat.yml | 39 ------------------ .../x-pack/pipeline.xpack.winlogbeat.yml | 18 -------- 16 files changed, 1 insertion(+), 447 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index 026fb922e6d..7aaa8b7019d 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -32,9 +32,6 @@ steps: set -euo pipefail cd auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -51,9 +48,6 @@ steps: set -euo pipefail cd auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9}" @@ -69,9 +63,6 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -89,9 +80,6 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -110,9 +98,6 @@ steps: make -C auditbeat crosscompile env: GOX_FLAGS: "-arch amd64" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -151,9 +136,6 @@ steps: set -euo pipefail cd auditbeat mage build integTest - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -189,14 +171,7 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat -<<<<<<< HEAD mage build unitTest -======= - mage unitTest - retry: - automatic: - - limit: 3 ->>>>>>> 02ea29d8cf (Enabling retries for Beats flaky tests (#39174)) agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -213,14 +188,7 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat -<<<<<<< HEAD mage build unitTest -======= - mage unitTest - retry: - automatic: - - limit: 3 ->>>>>>> 02ea29d8cf (Enabling retries for Beats flaky tests (#39174)) agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -241,9 +209,6 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -262,9 +227,6 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -283,9 +245,6 @@ steps: command: | Set-Location -Path auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" diff --git a/.buildkite/filebeat/filebeat-pipeline.yml b/.buildkite/filebeat/filebeat-pipeline.yml index 053e8dbec41..7eedd9d76fb 100644 --- a/.buildkite/filebeat/filebeat-pipeline.yml +++ b/.buildkite/filebeat/filebeat-pipeline.yml @@ -30,9 +30,6 @@ steps: command: | cd filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -48,9 +45,6 @@ steps: command: | cd filebeat mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -66,9 +60,6 @@ steps: command: | cd filebeat mage pythonIntegTest - retry: - automatic: - - limit: 3 agents: provider: gcp image: "${IMAGE_UBUNTU_X86_64}" @@ -85,9 +76,6 @@ steps: command: | Set-Location -Path filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -106,9 +94,6 @@ steps: command: | Set-Location -Path filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -133,9 +118,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -154,9 +136,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -173,9 +152,6 @@ steps: command: | cd filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -196,9 +172,6 @@ steps: command: | Set-Location -Path filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -217,9 +190,6 @@ steps: command: | Set-Location -Path filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -238,9 +208,6 @@ steps: command: | Set-Location -Path filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index cadbcec1eca..8091b2eead1 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -30,9 +30,6 @@ steps: command: | cd heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -48,9 +45,6 @@ steps: command: | cd heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9}" @@ -67,9 +61,6 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -87,9 +78,6 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -106,9 +94,6 @@ steps: command: | cd heartbeat mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -124,9 +109,6 @@ steps: command: | cd heartbeat mage pythonIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -148,9 +130,6 @@ steps: command: | cd heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -172,9 +151,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -192,9 +168,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -215,9 +188,6 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -235,9 +205,6 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -255,9 +222,6 @@ steps: command: | Set-Location -Path heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" diff --git a/.buildkite/libbeat/pipeline.libbeat.yml b/.buildkite/libbeat/pipeline.libbeat.yml index bc77712c330..040ad9b1d66 100644 --- a/.buildkite/libbeat/pipeline.libbeat.yml +++ b/.buildkite/libbeat/pipeline.libbeat.yml @@ -21,9 +21,6 @@ steps: set -euo pipefail cd libbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -41,9 +38,6 @@ steps: set -euo pipefail cd libbeat mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -61,9 +55,6 @@ steps: set -euo pipefail cd libbeat mage pythonIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -81,9 +72,6 @@ steps: set -euo pipefail cd libbeat make crosscompile - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -101,9 +89,6 @@ steps: set -euo pipefail cd libbeat make STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' GOTEST_OUTPUT_OPTIONS=' | go-junit-report > libbeat-stress-test.xml' stress-tests - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -123,9 +108,6 @@ steps: set -euo pipefail cd libbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/metricbeat/pipeline.yml b/.buildkite/metricbeat/pipeline.yml index d15212d2ef3..1fb6bfcc237 100644 --- a/.buildkite/metricbeat/pipeline.yml +++ b/.buildkite/metricbeat/pipeline.yml @@ -32,9 +32,6 @@ steps: - label: ":linux: Ubuntu Unit Tests" key: "mandatory-linux-unit-test" command: "cd metricbeat && mage build unitTest" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -65,9 +62,6 @@ steps: echo "~~~ Running tests" export KUBECONFIG="$$PWD/kubecfg" cd metricbeat && mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -98,9 +92,6 @@ steps: echo "~~~ Running tests" export KUBECONFIG="$$PWD/kubecfg" cd metricbeat && mage pythonIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -115,9 +106,6 @@ steps: - label: ":negative_squared_cross_mark: Cross compile" key: "mandatory-cross-compile" command: "make -C metricbeat crosscompile" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -134,9 +122,6 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -155,9 +140,6 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -180,9 +162,6 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -201,9 +180,6 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -222,9 +198,6 @@ steps: Set-Location -Path metricbeat mage build unitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -248,9 +221,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd metricbeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -268,9 +238,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd metricbeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/packetbeat/pipeline.packetbeat.yml b/.buildkite/packetbeat/pipeline.packetbeat.yml index d510107a89c..c0f5c1e1a73 100644 --- a/.buildkite/packetbeat/pipeline.packetbeat.yml +++ b/.buildkite/packetbeat/pipeline.packetbeat.yml @@ -28,9 +28,6 @@ steps: command: | cd packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -46,9 +43,6 @@ steps: command: | cd packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9_X86_64}" @@ -64,9 +58,6 @@ steps: command: | Set-Location -Path packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -84,9 +75,6 @@ steps: command: | Set-Location -Path packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -108,9 +96,6 @@ steps: command: | Set-Location -Path packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -129,9 +114,6 @@ steps: Set-Location -Path packetbeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -150,9 +132,6 @@ steps: Set-Location -Path packetbeat mage build unitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -177,9 +156,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -198,9 +174,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -215,9 +188,6 @@ steps: key: "linux-arm64-unit-tests-extended" command: "cd packetbeat && mage build unitTest" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/winlogbeat/pipeline.winlogbeat.yml b/.buildkite/winlogbeat/pipeline.winlogbeat.yml index ff332791349..c71858b45b0 100644 --- a/.buildkite/winlogbeat/pipeline.winlogbeat.yml +++ b/.buildkite/winlogbeat/pipeline.winlogbeat.yml @@ -24,9 +24,6 @@ steps: - label: ":ubuntu: Winlogbeat Crossccompile" key: "mandatory-cross-compile" command: "make -C winlogbeat crosscompile" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -43,9 +40,6 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -64,9 +58,6 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "mandatory-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -85,9 +76,6 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -111,9 +99,6 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -132,9 +117,6 @@ steps: Set-Location -Path winlogbeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" diff --git a/.buildkite/x-pack/pipeline.xpack.auditbeat.yml b/.buildkite/x-pack/pipeline.xpack.auditbeat.yml index 80c298c725d..36fcb9bebd9 100644 --- a/.buildkite/x-pack/pipeline.xpack.auditbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.auditbeat.yml @@ -36,9 +36,6 @@ steps: echo "~~~ Will run tests with env var MODULE=$$MODULE" cd x-pack/auditbeat mage update build test - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -55,9 +52,6 @@ steps: command: | cd x-pack/auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9_X86_64}" @@ -74,9 +68,6 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -95,9 +86,6 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -120,9 +108,6 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -141,9 +126,6 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -162,9 +144,6 @@ steps: Set-Location -Path x-pack/auditbeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -188,9 +167,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -207,9 +183,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" @@ -228,9 +201,6 @@ steps: command: | cd x-pack/auditbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml b/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml index a64f7851913..05aee81e4d8 100644 --- a/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml @@ -28,9 +28,6 @@ steps: - label: ":ubuntu: Xpack/Dockerlogbeat Ubuntu Unit Tests" key: "mandatory-linux-unit-test" command: "cd x-pack/dockerlogbeat && mage build unitTest" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -47,9 +44,6 @@ steps: command: "cd x-pack/dockerlogbeat && mage goIntegTest" env: MODULE: $MODULE - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" diff --git a/.buildkite/x-pack/pipeline.xpack.filebeat.yml b/.buildkite/x-pack/pipeline.xpack.filebeat.yml index b7e71e3c3c0..795302bc2d9 100644 --- a/.buildkite/x-pack/pipeline.xpack.filebeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.filebeat.yml @@ -30,9 +30,6 @@ steps: command: | cd x-pack/filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -53,9 +50,6 @@ steps: defineModuleFromTheChangeSet x-pack/filebeat echo "~~~ Will run tests with env var MODULE=$$MODULE" cd x-pack/filebeat && mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -76,9 +70,6 @@ steps: defineModuleFromTheChangeSet x-pack/filebeat echo "~~~ Running tests with env var MODULE=$$MODULE" cd x-pack/filebeat && mage pythonIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -95,9 +86,6 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -116,9 +104,6 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -137,9 +122,6 @@ steps: command: | cd x-pack/filebeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" @@ -160,9 +142,6 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -181,9 +160,6 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -202,9 +178,6 @@ steps: Set-Location -Path x-pack/filebeat mage build unitTest key: "x-pack-filebeat-extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -227,9 +200,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/filebeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -247,9 +217,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/filebeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.heartbeat.yml b/.buildkite/x-pack/pipeline.xpack.heartbeat.yml index 136706e698c..107dfa65f1b 100644 --- a/.buildkite/x-pack/pipeline.xpack.heartbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.heartbeat.yml @@ -39,9 +39,6 @@ steps: echo "~~~ Running tests" cd x-pack/heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -62,9 +59,6 @@ steps: echo "~~~ Running tests" cd x-pack/heartbeat mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -82,9 +76,6 @@ steps: command: | Set-Location -Path x-pack/heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -104,9 +95,6 @@ steps: command: | Set-Location -Path x-pack/heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -130,9 +118,6 @@ steps: Set-Location -Path x-pack/heartbeat mage build test key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -151,9 +136,6 @@ steps: Set-Location -Path x-pack/heartbeat mage build test key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -171,9 +153,6 @@ steps: command: | Set-Location -Path x-pack/heartbeat mage build test - retry: - automatic: - - limit: 3 key: "extended-win-2019-unit-tests" agents: provider: "gcp" @@ -187,7 +166,7 @@ steps: notify: - github_commit_status: context: "x-pack/heartbeat: Windows 2019 Unit Tests" - + - group: "x-pack/heartbeat MacOS Extended Tests" key: "x-pack-heartbeat-extended-tests-macos" if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/ @@ -200,9 +179,6 @@ steps: installNodeJsDependencies cd x-pack/heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -221,9 +197,6 @@ steps: installNodeJsDependencies cd x-pack/heartbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.libbeat.yml b/.buildkite/x-pack/pipeline.xpack.libbeat.yml index 6bf456f6d83..14316a3ecd7 100644 --- a/.buildkite/x-pack/pipeline.xpack.libbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.libbeat.yml @@ -26,9 +26,6 @@ steps: command: | cd x-pack/libbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -45,9 +42,6 @@ steps: command: | cd x-pack/libbeat mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -64,9 +58,6 @@ steps: command: | cd x-pack/libbeat mage pythonIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -83,9 +74,6 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -104,9 +92,6 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -129,9 +114,6 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -150,9 +132,6 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -171,9 +150,6 @@ steps: Set-Location -Path x-pack/libbeat mage -w reader\etw build goUnitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -196,9 +172,6 @@ steps: command: | cd x-pack/libbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" diff --git a/.buildkite/x-pack/pipeline.xpack.metricbeat.yml b/.buildkite/x-pack/pipeline.xpack.metricbeat.yml index 4c1c31521f9..317b9069c55 100644 --- a/.buildkite/x-pack/pipeline.xpack.metricbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.metricbeat.yml @@ -30,9 +30,6 @@ steps: command: | cd x-pack/metricbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -53,9 +50,6 @@ steps: defineModuleFromTheChangeSet x-pack/metricbeat echo "~~~ Will run tests with env var MODULE=$$MODULE" cd x-pack/metricbeat && mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -76,9 +70,6 @@ steps: defineModuleFromTheChangeSet x-pack/metricbeat echo "~~~ Running tests with env var MODULE=$$MODULE" cd x-pack/metricbeat && mage pythonIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -95,9 +86,6 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -116,9 +104,6 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -141,9 +126,6 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -162,9 +144,6 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -183,9 +162,6 @@ steps: Set-Location -Path x-pack/metricbeat mage build unitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -209,9 +185,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/metricbeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -229,9 +202,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/metricbeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml b/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml index c8ecac79735..8c9137cb423 100644 --- a/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.osquerybeat.yml @@ -30,9 +30,6 @@ steps: command: | cd x-pack/osquerybeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -49,9 +46,6 @@ steps: command: | cd x-pack/osquerybeat mage goIntegTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -68,9 +62,6 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -89,9 +80,6 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -114,9 +102,6 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -135,9 +120,6 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -156,9 +138,6 @@ steps: Set-Location -Path x-pack/osquerybeat mage build unitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -181,9 +160,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/osquerybeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -199,9 +175,6 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd x-pack/osquerybeat && mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.packetbeat.yml b/.buildkite/x-pack/pipeline.xpack.packetbeat.yml index 1ab71c30d7d..77fdf2af848 100644 --- a/.buildkite/x-pack/pipeline.xpack.packetbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.packetbeat.yml @@ -29,9 +29,6 @@ steps: command: | cd x-pack/packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -48,9 +45,6 @@ steps: command: | cd x-pack/packetbeat mage systemTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -67,9 +61,6 @@ steps: command: | cd x-pack/packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_RHEL9_X86_64}" @@ -86,9 +77,6 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -107,9 +95,6 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -129,9 +114,6 @@ steps: command: | Set-Location -Path x-pack/packetbeat mage systemTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -154,9 +136,6 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -175,9 +154,6 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -196,9 +172,6 @@ steps: Set-Location -Path x-pack/packetbeat mage build unitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -218,9 +191,6 @@ steps: command: | Set-Location -Path x-pack/packetbeat mage systemTest - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -244,9 +214,6 @@ steps: cd x-pack/packetbeat mage build unitTest if: build.env("GITHUB_PR_LABELS") =~ /.*arm.*/ - retry: - automatic: - - limit: 3 agents: provider: "aws" imagePrefix: "${IMAGE_UBUNTU_ARM_64}" @@ -269,9 +236,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -289,9 +253,6 @@ steps: source .buildkite/scripts/install_macos_tools.sh cd x-pack/packetbeat mage build unitTest - retry: - automatic: - - limit: 3 agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" diff --git a/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml b/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml index c6b5a6f59fe..c07e537adf0 100644 --- a/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.winlogbeat.yml @@ -29,9 +29,6 @@ steps: mage build unitTest env: MODULE: $MODULE - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" @@ -50,9 +47,6 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "mandatory-win-2016-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2016}" @@ -71,9 +65,6 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "mandatory-win-2022-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2022}" @@ -97,9 +88,6 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "extended-win-10-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_10}" @@ -118,9 +106,6 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "extended-win-11-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_11}" @@ -139,9 +124,6 @@ steps: Set-Location -Path x-pack/winlogbeat mage build unitTest key: "extended-win-2019-unit-tests" - retry: - automatic: - - limit: 3 agents: provider: "gcp" image: "${IMAGE_WIN_2019}" From 9e713add62aa516541f64f13f9b2d9e6a87a97c1 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 12:14:28 +0300 Subject: [PATCH 13/16] fix conflicts --- .buildkite/auditbeat/auditbeat-pipeline.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index cd97ba8827a..13e3ef2f256 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -132,8 +132,10 @@ steps: command: | set -euo pipefail cd auditbeat -<<<<<<< HEAD mage build integTest + retry: + automatic: + - limit: 3 agents: provider: "gcp" image: "${IMAGE_UBUNTU_X86_64}" @@ -152,12 +154,9 @@ steps: set -euo pipefail cd auditbeat mage build integTest -======= - mage unitTest retry: automatic: - limit: 3 ->>>>>>> main agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -176,6 +175,9 @@ steps: set -euo pipefail cd auditbeat mage build unitTest + retry: + automatic: + - limit: 3 agents: provider: "aws" imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}" @@ -193,14 +195,10 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat -<<<<<<< HEAD mage build unitTest -======= - mage unitTest retry: automatic: - limit: 3 ->>>>>>> main agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" @@ -217,14 +215,10 @@ steps: set -euo pipefail source .buildkite/scripts/install_macos_tools.sh cd auditbeat -<<<<<<< HEAD mage build unitTest -======= - mage unitTest retry: automatic: - limit: 3 ->>>>>>> main agents: provider: "orka" imagePrefix: "${IMAGE_MACOS_ARM}" From 9209cf5815d5175999555280d241bc57709e60fd Mon Sep 17 00:00:00 2001 From: Panos Koutsovasilis Date: Thu, 2 May 2024 13:58:15 +0300 Subject: [PATCH 14/16] fix(auditbeat/fim/fsnotify): do not return error immediately as this causes losing events on mac --- auditbeat/module/file_integrity/monitor/monitor_test.go | 2 +- auditbeat/module/file_integrity/monitor/recursive.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/auditbeat/module/file_integrity/monitor/monitor_test.go b/auditbeat/module/file_integrity/monitor/monitor_test.go index 2f66d6469b2..506f559be55 100644 --- a/auditbeat/module/file_integrity/monitor/monitor_test.go +++ b/auditbeat/module/file_integrity/monitor/monitor_test.go @@ -192,7 +192,7 @@ func TestRecursiveSubdirPermissions(t *testing.T) { ev, err := readTimeout(t, watcher) assert.Equal(t, errReadTimeout, err) - if err != errReadTimeout { + if !errors.Is(err, errReadTimeout) { t.Fatalf("Expected timeout, got event %+v", ev) } diff --git a/auditbeat/module/file_integrity/monitor/recursive.go b/auditbeat/module/file_integrity/monitor/recursive.go index 31f2b538370..6cdb98f8464 100644 --- a/auditbeat/module/file_integrity/monitor/recursive.go +++ b/auditbeat/module/file_integrity/monitor/recursive.go @@ -113,11 +113,11 @@ func (watcher *recursiveWatcher) addRecursive(path string) error { return nil } + var errs multierror.Errors if err := watcher.watchFile(path, nil); err != nil { - return fmt.Errorf("failed adding watcher to '%s': %w", path, err) + errs = append(errs, fmt.Errorf("failed adding watcher to '%s': %w", path, err)) } - var errs multierror.Errors err := filepath.Walk(path, func(walkPath string, info os.FileInfo, fnErr error) error { if walkPath == path { return nil From b729290bbe49e4f25fdfc5920bc3c9a6582defdc Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 16:26:33 +0300 Subject: [PATCH 15/16] Revert "fix(auditbeat/fim/kprobes): check correctly with "fsnotify_nameremove"" This reverts commit 907f94a7134562b42b6cfd6d4639e19c239bcf25. --- .../kprobes/probes_fsnotify_nameremove.go | 2 +- .../file_integrity/kprobes/seccomp_linux.go | 31 ------------------- auditbeat/tests/system/test_file_integrity.py | 1 + 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 auditbeat/module/file_integrity/kprobes/seccomp_linux.go diff --git a/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go b/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go index 47fc5df9f0a..ecabb94c7d2 100644 --- a/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go +++ b/auditbeat/module/file_integrity/kprobes/probes_fsnotify_nameremove.go @@ -35,7 +35,7 @@ func loadFsNotifyNameRemoveSymbol(s *probeManager) error { if err != nil { if errors.Is(err, ErrSymbolNotFound) { s.buildChecks = append(s.buildChecks, func(spec *tkbtf.Spec) bool { - return !spec.ContainsSymbol("fsnotify_nameremove") + return !spec.ContainsSymbol(symbolInfo.symbolName) }) return nil } diff --git a/auditbeat/module/file_integrity/kprobes/seccomp_linux.go b/auditbeat/module/file_integrity/kprobes/seccomp_linux.go deleted file mode 100644 index 8c8b211c10b..00000000000 --- a/auditbeat/module/file_integrity/kprobes/seccomp_linux.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. - -package kprobes - -import ( - "runtime" - - "github.com/elastic/beats/v7/libbeat/common/seccomp" -) - -func init() { - switch runtime.GOARCH { - case "amd64", "386", "arm64": - // The module/file_integrity with kprobes BE uses additional syscalls - if err := seccomp.ModifyDefaultPolicy(seccomp.AddSyscall, - "eventfd2", // required by auditbeat/tracing - "mount", // required by auditbeat/tracing - "perf_event_open", // required by auditbeat/tracing - "ppoll", // required by auditbeat/tracing - "umount2", // required by auditbeat/tracing - "truncate", // required during kprobes verification - "utime", // required during kprobes verification - "utimensat", // required during kprobes verification - "setxattr", // required during kprobes verification - ); err != nil { - panic(err) - } - } -} diff --git a/auditbeat/tests/system/test_file_integrity.py b/auditbeat/tests/system/test_file_integrity.py index c82f3187a60..64062dd0a77 100644 --- a/auditbeat/tests/system/test_file_integrity.py +++ b/auditbeat/tests/system/test_file_integrity.py @@ -108,6 +108,7 @@ def _assert_process_data(self, event, backend): if backend != "ebpf": return assert event["process.entity_id"] != "" + assert event["process.executable"] == "pytest" assert event["process.pid"] == os.getpid() assert int(event["process.user.id"]) == os.geteuid() assert event["process.user.name"] == pwd.getpwuid(os.geteuid()).pw_name From 3195d72d392f859a567e379b9e87c16a1e3bbaea Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 2 May 2024 16:26:49 +0300 Subject: [PATCH 16/16] Revert "fix(auditbeat/fim/fsnotify): do not return error immediately as this causes losing events on mac" This reverts commit 9209cf5815d5175999555280d241bc57709e60fd. --- auditbeat/module/file_integrity/monitor/monitor_test.go | 2 +- auditbeat/module/file_integrity/monitor/recursive.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/auditbeat/module/file_integrity/monitor/monitor_test.go b/auditbeat/module/file_integrity/monitor/monitor_test.go index 506f559be55..2f66d6469b2 100644 --- a/auditbeat/module/file_integrity/monitor/monitor_test.go +++ b/auditbeat/module/file_integrity/monitor/monitor_test.go @@ -192,7 +192,7 @@ func TestRecursiveSubdirPermissions(t *testing.T) { ev, err := readTimeout(t, watcher) assert.Equal(t, errReadTimeout, err) - if !errors.Is(err, errReadTimeout) { + if err != errReadTimeout { t.Fatalf("Expected timeout, got event %+v", ev) } diff --git a/auditbeat/module/file_integrity/monitor/recursive.go b/auditbeat/module/file_integrity/monitor/recursive.go index 6cdb98f8464..31f2b538370 100644 --- a/auditbeat/module/file_integrity/monitor/recursive.go +++ b/auditbeat/module/file_integrity/monitor/recursive.go @@ -113,11 +113,11 @@ func (watcher *recursiveWatcher) addRecursive(path string) error { return nil } - var errs multierror.Errors if err := watcher.watchFile(path, nil); err != nil { - errs = append(errs, fmt.Errorf("failed adding watcher to '%s': %w", path, err)) + return fmt.Errorf("failed adding watcher to '%s': %w", path, err) } + var errs multierror.Errors err := filepath.Walk(path, func(walkPath string, info os.FileInfo, fnErr error) error { if walkPath == path { return nil