Alerting: Enable Unified Alerting for open source and enterprise (#49834)

This commit enables Unified Alerting for open source and enterprise unless disabled in configuration.
This commit is contained in:
George Robinson
2022-05-30 16:47:15 +01:00
committed by GitHub
parent 2b83cf4618
commit 3b7f871bf4
5 changed files with 42 additions and 185 deletions
@@ -1,8 +1,6 @@
package migrations
import (
"os"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations/accesscontrol"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations/ualert"
@@ -52,11 +50,6 @@ func (*OSSMigrations) AddMigration(mg *Migrator) {
addUserAuthTokenMigrations(mg)
addCacheMigration(mg)
addShortURLMigrations(mg)
// TODO Delete when unified alerting is enabled by default unconditionally (Grafana v9)
if err := ualert.CheckUnifiedAlertingEnabledByDefault(mg); err != nil { // this should always go before any other ualert migration
mg.Logger.Error("failed to determine the status of alerting engine. Enable either legacy or unified alerting explicitly and try again", "err", err)
os.Exit(1)
}
ualert.AddTablesMigrations(mg)
ualert.AddDashAlertMigration(mg)
addLibraryElementsMigrations(mg)