Alerting: Rule Version API to Ignore versions without diff (#100093)

This commit is contained in:
Yuri Tseretyan
2025-02-10 09:20:35 -05:00
committed by GitHub
parent dec07c4c34
commit 1b8db233a7
4 changed files with 114 additions and 1 deletions
+6
View File
@@ -563,6 +563,12 @@ func (a *AlertRuleMutators) WithKey(key AlertRuleKey) AlertRuleMutator {
}
}
func (a *AlertRuleMutators) WithVersion(version int64) AlertRuleMutator {
return func(r *AlertRule) {
r.Version = version
}
}
func (g *AlertRuleGenerator) GenerateLabels(min, max int, prefix string) data.Labels {
count := max
if min > max {