From 18d37f81d87d5db68c91e76e2aed525d2f1bc334 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 8 Jun 2022 23:48:34 -0600 Subject: [PATCH] Alerting: Improve Unified Alerting Rollback Warning (#50470) (#50471) After migrating to unified alerting, users must explicitly allow rolling back to legacy alerting by setting force_migration = true in config. This updates the panic message to clarify why that's required and what the consequences of rolling back will be. Fixes #50469 (cherry picked from commit 30f035ca347d9f6ba02bc48c0e1f183c885227c5) Co-authored-by: Joe Blubaugh --- pkg/services/sqlstore/migrations/ualert/ualert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/sqlstore/migrations/ualert/ualert.go b/pkg/services/sqlstore/migrations/ualert/ualert.go index 3c66ddb33d1..affd5aee479 100644 --- a/pkg/services/sqlstore/migrations/ualert/ualert.go +++ b/pkg/services/sqlstore/migrations/ualert/ualert.go @@ -75,7 +75,7 @@ func AddDashAlertMigration(mg *migrator.Migrator) { case !mg.Cfg.UnifiedAlerting.IsEnabled() && migrationRun: // Safeguard to prevent data loss when migrating from UA to LA if !mg.Cfg.ForceMigration { - panic("New alert rules created while using unified alerting will be deleted, set force_migration=true in your grafana.ini and try again if this is okay.") + panic("Grafana has already been migrated to Unified Alerting.\nAny alert rules created while using Unified Alerting will be deleted by rolling back.\n\nSet force_migration=true in your grafana.ini and restart Grafana to roll back and delete Unified Alerting configuration data.") } // Remove the migration entry that creates unified alerting data. This is so when the feature // flag is enabled in the future the migration "move dashboard alerts to unified alerting" will be run again.