AlertNotifications: Translate notifications IDs to UIDs in Rule builder (#19882)

* AlertNotifications: Translate notifications IDs to UIDs in alert Rule builder

* Avoid shadowing errors, raise validation error on non-existing notification id

* create a cache for notification Uids to minimize db overhead

* add cache usage test

* avoid caching empty notification Uids

* isolate db in alert notificationUid caching tests
This commit is contained in:
Dima Ryskin
2020-03-18 15:00:56 +02:00
committed by GitHub
parent 492264abc3
commit 44b7f3ea1c
6 changed files with 198 additions and 8 deletions
+1
View File
@@ -99,6 +99,7 @@ func (ss *SqlStore) Init() error {
// Register handlers
ss.addUserQueryAndCommandHandlers()
ss.addAlertNotificationUidByIdHandler()
if ss.skipEnsureDefaultOrgAndUser {
return nil