[v10.4.x] SSE: Fix threshold unmarshal to avoid panic (#88650)

SSE: Fix threshold unmarshal to avoid panic (#88521)

(cherry picked from commit 043e19afb5)

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-06-04 08:55:03 -04:00
committed by GitHub
co-authored by Yuri Tseretyan
parent 32f04b3d31
commit 4a29d54f06
+1 -1
View File
@@ -84,10 +84,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)