[v9.3.x] Alerting: Set Dashboard and Panel IDs on rule group replacement (#60444)

Alerting: Set Dashboard and Panel IDs on rule group replacement (#60374)

* Set Dashboard and Panel IDs on rule group replacement

* fix comments and abbreviate test variable name

* Update pkg/services/ngalert/provisioning/alert_rules.go

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
(cherry picked from commit 174c61b949)

Co-authored-by: Alex Moreno <alexander.moreno@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-12-16 12:32:57 +01:00
committed by GitHub
co-authored by Alex Moreno
parent 81c35a7c32
commit 2d876e90b9
5 changed files with 111 additions and 7 deletions
@@ -108,7 +108,7 @@ func validateRuleNode(
newAlertRule.Annotations = ruleNode.ApiRuleNode.Annotations
newAlertRule.Labels = ruleNode.ApiRuleNode.Labels
err = newAlertRule.SetDashboardAndPanel()
err = newAlertRule.SetDashboardAndPanelFromAnnotations()
if err != nil {
return nil, err
}