FeatureFlags: manage feature flags outside of settings.Cfg (#43692)

This commit is contained in:
Ryan McKinley
2022-01-20 13:42:05 -08:00
committed by GitHub
parent 7fbc7d019a
commit f94c0decbd
65 changed files with 1244 additions and 252 deletions

View File

@@ -79,7 +79,7 @@ func (cfg *Cfg) readUnifiedAlertingEnabledSetting(section *ini.Section) (*bool,
// the unified alerting is not enabled by default. First, check the feature flag
if err != nil {
// TODO: Remove in Grafana v9
if cfg.FeatureToggles["ngalert"] {
if cfg.IsFeatureToggleEnabled("ngalert") {
cfg.Logger.Warn("ngalert feature flag is deprecated: use unified alerting enabled setting instead")
enabled = true
// feature flag overrides the legacy alerting setting.