Skip to content

Commit

Permalink
Remove unused feature flags
Browse files Browse the repository at this point in the history
This commit removes some code that should have been removed in prometheus#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 <george.robinson@grafana.com>
  • Loading branch information
grobinson-grafana committed Jan 19, 2024
1 parent 30fa9cd commit 5729869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion cmd/alertmanager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions silence/silence.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5729869

Please sign in to comment.