Alerting: remove interpolation of annotations from alert rule file provisioning (#54975)

This commit is contained in:
Jean-Philippe Quéméner 2022-09-09 18:47:54 +02:00 committed by GitHub
parent c5be9605a2
commit bc4d929c67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,7 @@ func (rule *AlertRuleV1) mapToModel(orgID int64) (models.AlertRule, error) {
if alertRule.Condition == "" {
return models.AlertRule{}, fmt.Errorf("rule '%s' failed to parse: no condition set", alertRule.Title)
}
alertRule.Annotations = rule.Annotations.Value()
alertRule.Annotations = rule.Annotations.Raw
alertRule.Labels = rule.Labels.Value()
for _, queryV1 := range rule.Data {
query, err := queryV1.mapToModel()