From 0f436c5bdfff27041e34e6859caf10fe1a166471 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:55:21 -0400 Subject: [PATCH] [v11.0.x] SSE: Fix threshold unmarshal to avoid panic (#88651) SSE: Fix threshold unmarshal to avoid panic (#88521) (cherry picked from commit 043e19afb509a22ed2debc8b6485b96a4e6e723c) Co-authored-by: Yuri Tseretyan --- 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 b8991df2f94..171f61d4f6c 100644 --- a/pkg/expr/threshold.go +++ b/pkg/expr/threshold.go @@ -92,10 +92,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)