grafana/pkg/services/ngalert/migration
Matthew Jacobson 2b51f0e263
Alerting: In migration improve deduplication of title and group (#78351)
* Alerting: In migration improve deduplication of title and group

This change improves alert titles generated in the legacy migration 
that occur when we need to deduplicate titles. Now when duplicate 
titles are detected we will first attempt to append a sequential index, 
falling back to a random uid if none are unique within 10 attempts. 
This should cause shorter and more easily readable deduplicated 
titles in most cases.

In addition, groups are no longer deduplicated. Instead we set them 
to a combination of truncated dashboard name and humanized alert 
frequency. This way, alerts from the same dashboard share a group 
if they have the same evaluation interval. In the event that truncation 
causes overlap, it won't be a big issue as all alerts will still be in a 
group with the correct evaluation interval.
2023-11-29 10:05:00 -05:00
..
models Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
store FeatureToggles: Add context and and an explicit global check (#78081) 2023-11-14 12:50:27 -08:00
alert_rule_test.go Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
alert_rule.go Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
channel_test.go Alerting: Move legacy alert migration from sqlstore migration to service (#72702) 2023-10-12 13:43:10 +01:00
channel.go Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
cond_trans_test.go Alerting: In migration, fallback to '1s' for malformed min interval (#78614) 2023-11-24 11:27:44 -05:00
cond_trans.go Alerting: In migration, fallback to '1s' for malformed min interval (#78614) 2023-11-24 11:27:44 -05:00
migration_test.go Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
models.go Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
permissions_test.go Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
permissions.go Authz: Remove use of SignedInUser copy for permission evaluation (#78448) 2023-11-22 14:20:22 +01:00
securejsondata.go Alerting: Move legacy alert migration from sqlstore migration to service (#72702) 2023-10-12 13:43:10 +01:00
service_test.go Alerting: Prevent cleanup of non-empty folders on migration revert (#76439) 2023-10-12 18:40:51 -04:00
service.go Alerting: Fix flaky SQLITE_BUSY when migrating with provisioned dashboards (#76658) 2023-10-19 10:03:00 -04:00
silences.go Alerting: Handle custom dashboard permissions in migration service (#74504) 2023-10-12 18:12:40 -04:00
template_test.go Alerting: Handle edge cases without panicking during template migration (#76890) 2023-11-02 13:24:54 -04:00
template.go Alerting: Handle edge cases without panicking during template migration (#76890) 2023-11-02 13:24:54 -04:00
testing.go Alerting: Fix flaky SQLITE_BUSY when migrating with provisioned dashboards (#76658) 2023-10-19 10:03:00 -04:00
ualert_test.go Alerting: In migration improve deduplication of title and group (#78351) 2023-11-29 10:05:00 -05:00
ualert.go Alerting: Handle custom dashboard permissions in migration service (#74504) 2023-10-12 18:12:40 -04:00