From 633272c5bb0468717f5d954c1adda05614f15e43 Mon Sep 17 00:00:00 2001 From: Pavel Zorin Date: Mon, 17 Feb 2025 14:19:29 +0100 Subject: [PATCH 1/4] [CI] New upgrade-flavor test group for TestStandaloneUpgrade_Flavor tests (#6870) --- .buildkite/bk.integration.pipeline.yml | 3 +++ testing/integration/groups_test.go | 3 +++ testing/integration/upgrade_standalone_flavors_test.go | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.buildkite/bk.integration.pipeline.yml b/.buildkite/bk.integration.pipeline.yml index 3bd3ee44243..8b966b9fbd9 100644 --- a/.buildkite/bk.integration.pipeline.yml +++ b/.buildkite/bk.integration.pipeline.yml @@ -44,6 +44,7 @@ steps: - fleet-privileged - standalone-upgrade - upgrade + - upgrade-flavor - install-uninstall - label: "Win2022:non-sudo:{{matrix}}" @@ -95,6 +96,7 @@ steps: matrix: - default - upgrade + - upgrade-flavor - standalone-upgrade - fleet - fleet-endpoint-security @@ -122,6 +124,7 @@ steps: matrix: - default - upgrade + - upgrade-flavor - standalone-upgrade - fleet - fleet-endpoint-security diff --git a/testing/integration/groups_test.go b/testing/integration/groups_test.go index bc6c93f0caa..b33d8e3cf97 100644 --- a/testing/integration/groups_test.go +++ b/testing/integration/groups_test.go @@ -35,6 +35,9 @@ const ( // Upgrade group of tests. Used for testing upgrades. Upgrade = "upgrade" + // UpgradeFlavor group of tests. Used for testing flavored upgrades. + UpgradeFlavor = "upgrade-flavor" + // StandaloneUpgrade group of tests. Used for TestStandaloneUpgrade. StandaloneUpgrade = "standalone-upgrade" diff --git a/testing/integration/upgrade_standalone_flavors_test.go b/testing/integration/upgrade_standalone_flavors_test.go index 8555f92746a..eb453bf1620 100644 --- a/testing/integration/upgrade_standalone_flavors_test.go +++ b/testing/integration/upgrade_standalone_flavors_test.go @@ -24,7 +24,7 @@ import ( func TestStandaloneUpgrade_Flavor_Basic(t *testing.T) { define.Require(t, define.Requirements{ - Group: Upgrade, + Group: UpgradeFlavor, Local: false, // requires Agent installation Sudo: true, // requires Agent installation }) @@ -82,7 +82,7 @@ func TestStandaloneUpgrade_Flavor_Basic(t *testing.T) { func TestStandaloneUpgrade_Flavor_Servers(t *testing.T) { define.Require(t, define.Requirements{ - Group: Upgrade, + Group: UpgradeFlavor, Local: false, // requires Agent installation Sudo: true, // requires Agent installation }) @@ -139,7 +139,7 @@ func TestStandaloneUpgrade_Flavor_Servers(t *testing.T) { func TestStandaloneUpgrade_Flavor_UpgradeFromUnflavored(t *testing.T) { define.Require(t, define.Requirements{ - Group: Upgrade, + Group: UpgradeFlavor, Local: false, // requires Agent installation Sudo: true, // requires Agent installation }) From 293092ca9b14a349874166e39baecbf99aaa2f15 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Mon, 17 Feb 2025 10:59:10 -0300 Subject: [PATCH 2/4] mage: run mage update steps in parallel (#6871) From the looks of it, none of the update steps interact with each other, so I don't see a reason to run them serially. As an example, making a single line change in the otel components file results in the following timings: parallel mage update 9.19s user 1.92s system 366% cpu 3.027 total serial mage update 20.20s user 2.93s system 181% cpu 12.748 total --- magefile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magefile.go b/magefile.go index 7957817daf6..27e0683b0e4 100644 --- a/magefile.go +++ b/magefile.go @@ -651,7 +651,7 @@ func commitID() string { // Update is an alias for executing control protocol, configs, and specs. func Update() { - mg.SerialDeps(Config, BuildPGP, BuildFleetCfg, Otel.Readme) + mg.Deps(Config, BuildPGP, BuildFleetCfg, Otel.Readme) } func EnsureCrossBuildOutputDir() error { From 6485c746c8f588f7e436d8ae3d4e460aa9e37765 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 08:34:02 +0100 Subject: [PATCH 3/4] build(deps): bump golangci/golangci-lint-action from 6.1.1 to 6.2.0 (#6532) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.1 to 6.2.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v6.1.1...v6.2.0) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 87356de2458..8e764d26301 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -25,7 +25,7 @@ jobs: go-version-file: .go-version - name: golangci-lint - uses: golangci/golangci-lint-action@v6.1.1 + uses: golangci/golangci-lint-action@v6.2.0 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: v1.61.0 From 38bcd03d6bfe043d1e9cbbe393092dd9600fd14e Mon Sep 17 00:00:00 2001 From: Vihas Makwana <121151420+VihasMakwana@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:04:52 +0530 Subject: [PATCH 4/4] chore: update config to reflect degrade_on_partial (#6640) --- _meta/config/common.p2.yml.tmpl | 14 ++++++++++++++ _meta/config/common.reference.p2.yml.tmpl | 14 ++++++++++++++ _meta/elastic-agent.yml | 14 ++++++++++++++ elastic-agent.reference.yml | 14 ++++++++++++++ elastic-agent.yml | 14 ++++++++++++++ 5 files changed, 70 insertions(+) diff --git a/_meta/config/common.p2.yml.tmpl b/_meta/config/common.p2.yml.tmpl index 57de0ec5d0a..8545b6c97cd 100644 --- a/_meta/config/common.p2.yml.tmpl +++ b/_meta/config/common.p2.yml.tmpl @@ -38,6 +38,20 @@ inputs: - metricsets: - filesystem data_stream.dataset: system.filesystem +# - metricsets: +# - process +# data_stream.dataset: system.process +# # While running in unprivileged mode, process/process_summary metricsets can emit +# # partial metrics. Some metrics that require privileged access can be missing. +# # On Windows, non-administrator users may not be able to access protected processes, leading +# # to missing details like command line and arguments. On Unix, non-root users can't access +# # procfs without the right permissions. +# # Errors like ERROR_ACCESS_DENIED, EPERM, and EACCESS may result in partial metrics. +# # Enabling the config below will mark the metricset as degraded when this occurs. +# # You may want to enable it to identify potential permission-related issues. +# # If you're unable to provide the necessary access, you can disable this config to keep +# # metricsets healthy. +# #degrade_on_partial: false # # Collecting log files # - type: filestream diff --git a/_meta/config/common.reference.p2.yml.tmpl b/_meta/config/common.reference.p2.yml.tmpl index 44de9243894..fc0e03319d7 100644 --- a/_meta/config/common.reference.p2.yml.tmpl +++ b/_meta/config/common.reference.p2.yml.tmpl @@ -36,6 +36,20 @@ inputs: - metricsets: - filesystem data_stream.dataset: system.filesystem +# - metricsets: +# - process +# data_stream.dataset: system.process +# # While running in unprivileged mode, process/process_summary metricsets can emit +# # partial metrics. Some metrics that require privileged access can be missing. +# # On Windows, non-administrator users may not be able to access protected processes, leading +# # to missing details like command line and arguments. On Unix, non-root users can't access +# # procfs without the right permissions. +# # Errors like ERROR_ACCESS_DENIED, EPERM, and EACCESS may result in partial metrics. +# # Enabling the config below will mark the metricset as degraded when this occurs. +# # You may want to enable it to identify potential permission-related issues. +# # If you're unable to provide the necessary access, you can disable this config to keep +# # metricsets healthy. +# #degrade_on_partial: false # # Collecting log files # - type: filestream diff --git a/_meta/elastic-agent.yml b/_meta/elastic-agent.yml index c25bffafae3..e96f1391998 100644 --- a/_meta/elastic-agent.yml +++ b/_meta/elastic-agent.yml @@ -30,6 +30,20 @@ inputs: - metricsets: - filesystem data_stream.dataset: system.filesystem +# - metricsets: +# - process +# data_stream.dataset: system.process +# # While running in unprivileged mode, process/process_summary metricsets can emit +# # partial metrics. Some metrics that require privileged access can be missing. +# # On Windows, non-administrator users may not be able to access protected processes, leading +# # to missing details like command line and arguments. On Unix, non-root users can't access +# # procfs without the right permissions. +# # Errors like ERROR_ACCESS_DENIED, EPERM, and EACCESS may result in partial metrics. +# # Enabling the config below will mark the metricset as degraded when this occurs. +# # You may want to enable it to identify potential permission-related issues. +# # If you're unable to provide the necessary access, you can disable this config to keep +# # metricsets healthy. +# #degrade_on_partial: false # management: # # Mode of management, the Elastic Agent support two modes of operation: diff --git a/elastic-agent.reference.yml b/elastic-agent.reference.yml index bd1cc0f1273..1bbf618144e 100644 --- a/elastic-agent.reference.yml +++ b/elastic-agent.reference.yml @@ -42,6 +42,20 @@ inputs: - metricsets: - filesystem data_stream.dataset: system.filesystem +# - metricsets: +# - process +# data_stream.dataset: system.process +# # While running in unprivileged mode, process/process_summary metricsets can emit +# # partial metrics. Some metrics that require privileged access can be missing. +# # On Windows, non-administrator users may not be able to access protected processes, leading +# # to missing details like command line and arguments. On Unix, non-root users can't access +# # procfs without the right permissions. +# # Errors like ERROR_ACCESS_DENIED, EPERM, and EACCESS may result in partial metrics. +# # Enabling the config below will mark the metricset as degraded when this occurs. +# # You may want to enable it to identify potential permission-related issues. +# # If you're unable to provide the necessary access, you can disable this config to keep +# # metricsets healthy. +# #degrade_on_partial: false # # Collecting log files # - type: filestream diff --git a/elastic-agent.yml b/elastic-agent.yml index c54cd81fe37..b31244185fa 100644 --- a/elastic-agent.yml +++ b/elastic-agent.yml @@ -44,6 +44,20 @@ inputs: - metricsets: - filesystem data_stream.dataset: system.filesystem +# - metricsets: +# - process +# data_stream.dataset: system.process +# # While running in unprivileged mode, process/process_summary metricsets can emit +# # partial metrics. Some metrics that require privileged access can be missing. +# # On Windows, non-administrator users may not be able to access protected processes, leading +# # to missing details like command line and arguments. On Unix, non-root users can't access +# # procfs without the right permissions. +# # Errors like ERROR_ACCESS_DENIED, EPERM, and EACCESS may result in partial metrics. +# # Enabling the config below will mark the metricset as degraded when this occurs. +# # You may want to enable it to identify potential permission-related issues. +# # If you're unable to provide the necessary access, you can disable this config to keep +# # metricsets healthy. +# #degrade_on_partial: false # # Collecting log files # - type: filestream