[v11.0.x] SSE: Fix threshold unmarshal to avoid panic (#88651)
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
0ff6442e45
commit
0f436c5bdf
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user