From 043e19afb509a22ed2debc8b6485b96a4e6e723c Mon Sep 17 00:00:00 2001 From: Yuri Tseretyan Date: Mon, 3 Jun 2024 16:16:13 -0400 Subject: [PATCH] SSE: Fix threshold unmarshal to avoid panic (#88521) --- pkg/expr/threshold.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/expr/threshold.go b/pkg/expr/threshold.go index 9daab174bc0..127de9ce8a7 100644 --- a/pkg/expr/threshold.go +++ b/pkg/expr/threshold.go @@ -110,10 +110,10 @@ func UnmarshalThresholdCommand(rn *rawNode, features featuremgmt.FeatureToggles) } if firstCondition.UnloadEvaluator != nil && features.IsEnabledGlobally(featuremgmt.FlagRecoveryThreshold) { unloading, err := NewThresholdCommand(rn.RefID, referenceVar, firstCondition.UnloadEvaluator.Type, firstCondition.UnloadEvaluator.Params) - unloading.Invert = true if err != nil { return nil, fmt.Errorf("invalid unloadCondition: %w", err) } + unloading.Invert = true var d Fingerprints if firstCondition.LoadedDimensions != nil { d, err = FingerprintsFromFrame(firstCondition.LoadedDimensions)