Alerting: Remove feature toggle for custom recovery threshold (#104455)
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/expr/mathexp"
|
||||
"github.com/grafana/grafana/pkg/expr/metrics"
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
@@ -131,7 +130,7 @@ type ConditionEvalJSON struct {
|
||||
}
|
||||
|
||||
// UnmarshalResampleCommand creates a ResampleCMD from Grafana's frontend query.
|
||||
func UnmarshalThresholdCommand(rn *rawNode, features featuremgmt.FeatureToggles) (Command, error) {
|
||||
func UnmarshalThresholdCommand(rn *rawNode) (Command, error) {
|
||||
cmdConfig := ThresholdCommandConfig{}
|
||||
if err := json.Unmarshal(rn.QueryRaw, &cmdConfig); err != nil {
|
||||
return nil, fmt.Errorf("failed to parse the threshold command: %w", err)
|
||||
@@ -151,7 +150,7 @@ func UnmarshalThresholdCommand(rn *rawNode, features featuremgmt.FeatureToggles)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid condition: %w", err)
|
||||
}
|
||||
if firstCondition.UnloadEvaluator != nil && features.IsEnabledGlobally(featuremgmt.FlagRecoveryThreshold) {
|
||||
if firstCondition.UnloadEvaluator != nil {
|
||||
unloading, err := NewThresholdCommand(rn.RefID, referenceVar, firstCondition.UnloadEvaluator.Type, firstCondition.UnloadEvaluator.Params)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid unloadCondition: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user