Skip to content

Commit

Permalink
Allow expiration of silences that exceed max size
Browse files Browse the repository at this point in the history
Signed-off-by: George Robinson <[email protected]>
  • Loading branch information
grobinson-grafana committed May 31, 2024
1 parent e5fee2b commit ada0127
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion silence/silence.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func (s *Silences) setSilence(sil *pb.Silence, now time.Time, skipValidate bool)
return err
}

if n := msil.Size(); s.limits.MaxPerSilenceSize > 0 && n > s.limits.MaxPerSilenceSize {
if n := msil.Size(); s.limits.MaxPerSilenceSize > 0 && n > s.limits.MaxPerSilenceSize && sil.EndsAt.After(now) {
return fmt.Errorf("silence exceeded maximum size: %d", s.limits.MaxPerSilenceSize)
}

Expand Down

0 comments on commit ada0127

Please sign in to comment.