Alerting: Create fewer contact points on migration (#47291)
* Alerting: Create fewer contact points on migration Previously a new contact point was created for every unique combination of channels attached to any legacy alert. This was very hard to maintain, requiring modifications in every generated contact point. This change deduplicates the generated contact points to a more reasonable state. There should now only be one contact point per legacy channel, and we attached multiple contact points to a route by nesting them. The sole exception to this is if there were multiple default legacy channels, in which case we create a redundant contact point containing all of them used only in the root policy. This allows for a much simpler notification policy structure. Co-authored-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
co-authored by
gotjosh
parent
5f594addbf
commit
0301d956da
@@ -16,8 +16,6 @@ func newTestMigration(t *testing.T) *migration {
|
||||
|
||||
Logger: log.New("test"),
|
||||
},
|
||||
migratedChannelsPerOrg: make(map[int64]map[*notificationChannel]struct{}),
|
||||
portedChannelGroupsPerOrg: make(map[int64]map[string]string),
|
||||
seenChannelUIDs: make(map[string]struct{}),
|
||||
seenChannelUIDs: make(map[string]struct{}),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user