mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
bug: nil check against the series set not errors
Signed-off-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
parent
4daaa59c08
commit
e6dcbd2e26
|
@ -281,8 +281,8 @@ func (r *AlertingRule) QueryforStateSeries(ctx context.Context, q storage.Querie
|
|||
}
|
||||
matchers = append(matchers, mt)
|
||||
})
|
||||
sset := q.Select(ctx, false, nil, matchers...)
|
||||
|
||||
sset := q.Select(ctx, false, nil, matchers...)
|
||||
return sset, sset.Err()
|
||||
}
|
||||
|
||||
|
|
|
@ -676,7 +676,7 @@ func (g *Group) RestoreForState(ts time.Time) {
|
|||
}
|
||||
|
||||
// No results for this alert rule.
|
||||
if err == nil {
|
||||
if sset == nil {
|
||||
level.Debug(g.logger).Log("msg", "Failed to find a series to restore the 'for' state", labels.AlertName, alertRule.Name())
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue