Alerting: Keep the latest version of deleted rule in version table (#101481)

* add feature toggle alertRuleRestore
* Update delete rule to require UserUID, remove all versions and create "delete" version that holds information about who and when deleted the rule
This commit is contained in:
Yuri Tseretyan
2025-03-05 09:15:26 -05:00
committed by GitHub
parent da2c382d80
commit 374380d1f6
16 changed files with 215 additions and 39 deletions
@@ -1930,8 +1930,9 @@ func createTestEnv(t *testing.T, testConfig string) testEnvironment {
Cfg: setting.UnifiedAlertingSettings{
BaseInterval: time.Second * 10,
},
FolderService: folderService,
Bus: bus.ProvideBus(tracing.InitializeTracerForTest()),
FolderService: folderService,
Bus: bus.ProvideBus(tracing.InitializeTracerForTest()),
FeatureToggles: featuremgmt.WithFeatures(),
}
user := &user.SignedInUser{
OrgID: 1,