From 2d73978c199653df3e4f7d3529c0eb0b9d25c222 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Tue, 16 Apr 2024 16:01:49 +0300 Subject: [PATCH 1/2] [Buildkite] Remove x-pack/auditbeat bot trigger (#38980) This commit removes the x-pack/auditbeat BK PR bot trigger in preparation for the migration to the static pipeline (#38828) --- .buildkite/pull-requests.json | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.buildkite/pull-requests.json b/.buildkite/pull-requests.json index bb074620ff65..5b631c82254a 100644 --- a/.buildkite/pull-requests.json +++ b/.buildkite/pull-requests.json @@ -96,22 +96,6 @@ "skip_ci_on_only_changed": [ ], "always_require_ci_on_changed": ["^x-pack/libbeat/.*", "^.buildkite/.*", "^go.mod", "^pytest.ini", "^dev-tools/.*", "^libbeat/.*", "^testing/.*", "^x-pack/libbeat/.*"] }, - { - "enabled": true, - "pipelineSlug": "beats-xpack-auditbeat", - "allow_org_users": true, - "allowed_repo_permissions": ["admin", "write"], - "allowed_list": [ ], - "set_commit_status": true, - "build_on_commit": true, - "build_on_comment": true, - "trigger_comment_regex": "^/test x-pack/auditbeat$", - "always_trigger_comment_regex": "^/test x-pack/auditbeat$", - "skip_ci_labels": [ ], - "skip_target_branches": [ ], - "skip_ci_on_only_changed": [ ], - "always_require_ci_on_changed": ["^x-pack/auditbeat/.*", "^.buildkite/.*", "^go.mod", "^pytest.ini", "^dev-tools/.*", "^libbeat/.*", "^testing/.*", "^x-pack/libbeat/.*"] - }, { "enabled": true, "pipelineSlug": "beats-xpack-heartbeat", From 3f1d32b372a453ed5127401de418a7fc4ed67f77 Mon Sep 17 00:00:00 2001 From: Blake Rouse Date: Tue, 16 Apr 2024 09:06:20 -0400 Subject: [PATCH 2/2] Fix issue with x-pack/metricbeat not using base settings. (#38959) Co-authored-by: Pierre HILBERT --- x-pack/metricbeat/cmd/root.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/x-pack/metricbeat/cmd/root.go b/x-pack/metricbeat/cmd/root.go index 76ac09294408..e62ccd33c6cc 100644 --- a/x-pack/metricbeat/cmd/root.go +++ b/x-pack/metricbeat/cmd/root.go @@ -5,14 +5,11 @@ package cmd import ( - "flag" "fmt" "github.com/spf13/cobra" - "github.com/spf13/pflag" "github.com/elastic/beats/v7/libbeat/cmd" - "github.com/elastic/beats/v7/libbeat/cmd/instance" "github.com/elastic/beats/v7/libbeat/ecs" "github.com/elastic/beats/v7/libbeat/processors" "github.com/elastic/beats/v7/libbeat/publisher/processing" @@ -47,19 +44,13 @@ var withECSVersion = processing.WithFields(mapstr.M{ }) func init() { - var runFlags = pflag.NewFlagSet(Name, pflag.ExitOnError) - runFlags.AddGoFlag(flag.CommandLine.Lookup("system.hostfs")) globalProcs, err := processors.NewPluginConfigFromList(defaultProcessors()) if err != nil { // these are hard-coded, shouldn't fail panic(fmt.Errorf("error creating global processors: %w", err)) } - settings := instance.Settings{ - RunFlags: runFlags, - Name: Name, - HasDashboards: true, - ElasticLicensed: true, - Processing: processing.MakeDefaultSupport(true, globalProcs, withECSVersion, processing.WithHost, processing.WithAgentMeta()), - } + settings := mbcmd.MetricbeatSettings() + settings.ElasticLicensed = true + settings.Processing = processing.MakeDefaultSupport(true, globalProcs, withECSVersion, processing.WithHost, processing.WithAgentMeta()) RootCmd = cmd.GenRootCmdWithSettings(beater.DefaultCreator(), settings) RootCmd.AddCommand(cmd.GenModulesCmd(Name, "", mbcmd.BuildModulesManager)) RootCmd.TestCmd.AddCommand(test.GenTestModulesCmd(Name, "", beater.DefaultTestModulesCreator()))