* Alerting: add safeguard for migrations that might cause dataloss
* add test for panic
* add documentation
(cherry picked from commit 0a87ef06af)
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
This commit is contained in:
co-authored by
Jean-Philippe Quéméner
parent
ae17f58a37
commit
3b40f18af1
@@ -386,6 +386,8 @@ type Cfg struct {
|
||||
|
||||
Env string
|
||||
|
||||
ForceMigration bool
|
||||
|
||||
// Analytics
|
||||
CheckForGrafanaUpdates bool
|
||||
CheckForPluginUpdates bool
|
||||
@@ -884,6 +886,7 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
|
||||
|
||||
Env = valueAsString(iniFile.Section(""), "app_mode", "development")
|
||||
cfg.Env = Env
|
||||
cfg.ForceMigration = iniFile.Section("").Key("force_migration").MustBool(false)
|
||||
InstanceName = valueAsString(iniFile.Section(""), "instance_name", "unknown_instance_name")
|
||||
plugins := valueAsString(iniFile.Section("paths"), "plugins", "")
|
||||
cfg.PluginsPath = makeAbsolute(plugins, HomePath)
|
||||
|
||||
Reference in New Issue
Block a user