From f92a08d073863b7e3731e503c45c81065c4b2910 Mon Sep 17 00:00:00 2001 From: George Robinson Date: Fri, 19 Jan 2024 10:43:50 +0000 Subject: [PATCH] Remove unused feature flags (#3676) This commit removes some code that should have been removed in #3668. The FeatureFlags in silence.Options are no longer used but were still initialized. These had a no-op effect. Signed-off-by: George Robinson --- cmd/alertmanager/main.go | 1 - silence/silence.go | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/alertmanager/main.go b/cmd/alertmanager/main.go index 53db23ea..584cf85e 100644 --- a/cmd/alertmanager/main.go +++ b/cmd/alertmanager/main.go @@ -251,7 +251,6 @@ func run() int { Retention: *retention, Logger: log.With(logger, "component", "silences"), Metrics: prometheus.DefaultRegisterer, - FeatureFlags: ff, } silences, err := silence.New(silenceOpts) diff --git a/silence/silence.go b/silence/silence.go index 7b400bfe..710323f7 100644 --- a/silence/silence.go +++ b/silence/silence.go @@ -37,7 +37,6 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/alertmanager/cluster" - "github.com/prometheus/alertmanager/featurecontrol" "github.com/prometheus/alertmanager/matchers/compat" "github.com/prometheus/alertmanager/pkg/labels" pb "github.com/prometheus/alertmanager/silence/silencepb" @@ -317,9 +316,8 @@ type Options struct { Retention time.Duration // A logger used by background processing. - Logger log.Logger - Metrics prometheus.Registerer - FeatureFlags featurecontrol.Flagger + Logger log.Logger + Metrics prometheus.Registerer } func (o *Options) validate() error {