[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:
co-authored by
Yuri Tseretyan
parent
32f04b3d31
commit
4a29d54f06
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user