Alerting: Do no hard fail on finding discontinued channels on migration (#34894) (#34902)

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit ad6648b649)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot) 2021-05-28 10:39:45 -04:00 committed by GitHub
parent c767dedffd
commit e1eebdcf75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()