From e1eebdcf75445d03d2cc72398f42389a40d37915 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 28 May 2021 10:39:45 -0400 Subject: [PATCH] Alerting: Do no hard fail on finding discontinued channels on migration (#34894) (#34902) Signed-off-by: Ganesh Vernekar (cherry picked from commit ad6648b649b50b4b331bf8c2b89d721adcc0e0e5) Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com> --- pkg/services/sqlstore/migrations/ualert/channel.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/services/sqlstore/migrations/ualert/channel.go b/pkg/services/sqlstore/migrations/ualert/channel.go index cc4070ef705..bf95deb716a 100644 --- a/pkg/services/sqlstore/migrations/ualert/channel.go +++ b/pkg/services/sqlstore/migrations/ualert/channel.go @@ -110,7 +110,8 @@ func (m *migration) makeReceiverAndRoute(ruleUid string, channelUids []interface addChannel := func(c *notificationChannel) error { if c.Type == "hipchat" || c.Type == "sensu" { - return fmt.Errorf("discontinued notification channel found: %s", c.Type) + m.mg.Logger.Error("alert migration error: discontinued notification channel found", "type", c.Type, "name", c.Name, "uid", c.Uid) + return nil } uid, ok := m.generateChannelUID() @@ -179,7 +180,8 @@ func (m *migration) updateDefaultAndUnmigratedChannels(amConfig *PostableUserCon continue } if c.Type == "hipchat" || c.Type == "sensu" { - return fmt.Errorf("discontinued notification channel found: %s", c.Type) + m.mg.Logger.Error("alert migration error: discontinued notification channel found", "type", c.Type, "name", c.Name, "uid", c.Uid) + continue } uid, ok := m.generateChannelUID()