FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382)

* Revert "FeatureToggles: register all enterprise feature toggles (#44336)"

This reverts commit f53b3fb007.

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

This reverts commit f94c0decbd.
This commit is contained in:
Agnès Toulet
2022-01-24 16:08:05 +01:00
committed by GitHub
parent 29268483c2
commit 65bdb3a899
66 changed files with 249 additions and 1324 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.IsFeatureToggleEnabled("ngalert") {
if cfg.FeatureToggles["ngalert"] {
cfg.Logger.Warn("ngalert feature flag is deprecated: use unified alerting enabled setting instead")
enabled = true
// feature flag overrides the legacy alerting setting.