bug: nil check against the series set not errors

Signed-off-by: gotjosh <josue.abreu@gmail.com>
pull/13980/head
gotjosh 2 years ago
parent 4daaa59c08
commit e6dcbd2e26
No known key found for this signature in database
GPG Key ID: A6E1DDE38FF3C74E
  1. 2
      rules/alerting.go
  2. 2
      rules/group.go

@ -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…
Cancel
Save