Revert: chore: a drop-in replacement for FeatureToggles.IsEnabledGlobally in app settings (#115593)
* Revert "chore: a drop-in replacement for FeatureToggles.IsEnabledGlobally in app settings (#113449)"
This reverts commit 26ce2c09d7.
* Change FeatureToggles.IsEnabledGlobally deprecation message
This commit is contained in:
@@ -76,7 +76,7 @@ func ProvideAppInstallers(
|
||||
if features.IsEnabledGlobally(featuremgmt.FlagKubernetesLogsDrilldown) {
|
||||
installers = append(installers, logsdrilldownAppInstaller)
|
||||
}
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
//nolint:staticcheck
|
||||
if features.IsEnabledGlobally(featuremgmt.FlagKubernetesAnnotations) {
|
||||
installers = append(installers, annotationAppInstaller)
|
||||
}
|
||||
|
||||
@@ -23,9 +23,7 @@ type FeatureToggles interface {
|
||||
// a full server restart for a change to take place.
|
||||
//
|
||||
// Deprecated: FeatureToggles.IsEnabledGlobally is deprecated and will be removed in a future release.
|
||||
// Toggles that must be reliably evaluated at the service startup should be
|
||||
// changed to settings (see setting.StartupSettings), and/or removed entirely.
|
||||
// For app registration please use `grafana-apiserver.runtime_config` in settings.ini
|
||||
// Toggles that must be reliably evaluated at the service startup should be changed to settings and/or removed entirely.
|
||||
IsEnabledGlobally(flag string) bool
|
||||
|
||||
// Get the enabled flags -- this *may* also include disabled flags (with value false)
|
||||
|
||||
@@ -511,9 +511,6 @@ type Cfg struct {
|
||||
// Query history
|
||||
QueryHistoryEnabled bool
|
||||
|
||||
// StartupSettings settings
|
||||
StartupSettings StartupSettings
|
||||
|
||||
// Open feature settings
|
||||
OpenFeature OpenFeatureSettings
|
||||
|
||||
@@ -1476,8 +1473,6 @@ func (cfg *Cfg) parseINIFile(iniFile *ini.File) error {
|
||||
// unified storage config
|
||||
cfg.setUnifiedStorageConfig()
|
||||
|
||||
// app platform config
|
||||
cfg.readStartupSettingsSection()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package setting
|
||||
|
||||
type StartupSettings struct {
|
||||
KubernetesAnnotationsAppEnabled bool
|
||||
}
|
||||
|
||||
func (cfg *Cfg) readStartupSettingsSection() {
|
||||
settings := StartupSettings{}
|
||||
|
||||
startupSettingsSection := cfg.Raw.Section("startup_settings")
|
||||
settings.KubernetesAnnotationsAppEnabled = startupSettingsSection.Key("annotations_app_enabled").MustBool(false)
|
||||
|
||||
cfg.StartupSettings = settings
|
||||
}
|
||||
Reference in New Issue
Block a user