Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746) (#39793)
* Remove `ngalert` feature toggle
* Update frontend
Remove all references of ngalert feature toggle
* Update docs
* Disable unified alerting for specific orgs
* Add backend tests
* Apply suggestions from code review
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Disabled unified alerting by default
* Ensure backward compatibility with old ngalert feature toggle
* Apply suggestions from code review
Co-authored-by: gotjosh <josue@grafana.com>
(cherry picked from commit 012d4f0905)
This commit is contained in:
@@ -28,16 +28,18 @@ func mockTimeNow() {
|
||||
func TestAlertInstanceOperations(t *testing.T) {
|
||||
_, dbstore := tests.SetupTestEnv(t, baseIntervalSeconds)
|
||||
|
||||
alertRule1 := tests.CreateTestAlertRule(t, dbstore, 60)
|
||||
const mainOrgID int64 = 1
|
||||
|
||||
alertRule1 := tests.CreateTestAlertRule(t, dbstore, 60, mainOrgID)
|
||||
orgID := alertRule1.OrgID
|
||||
|
||||
alertRule2 := tests.CreateTestAlertRule(t, dbstore, 60)
|
||||
alertRule2 := tests.CreateTestAlertRule(t, dbstore, 60, mainOrgID)
|
||||
require.Equal(t, orgID, alertRule2.OrgID)
|
||||
|
||||
alertRule3 := tests.CreateTestAlertRule(t, dbstore, 60)
|
||||
alertRule3 := tests.CreateTestAlertRule(t, dbstore, 60, mainOrgID)
|
||||
require.Equal(t, orgID, alertRule3.OrgID)
|
||||
|
||||
alertRule4 := tests.CreateTestAlertRule(t, dbstore, 60)
|
||||
alertRule4 := tests.CreateTestAlertRule(t, dbstore, 60, mainOrgID)
|
||||
require.Equal(t, orgID, alertRule4.OrgID)
|
||||
|
||||
t.Run("can save and read new alert instance", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user