chore : Deprecating FeatureToggles.IsEnabledGlobally (#112885)
* add deprecation on featuremgmt.IsEnabledGlobally * add nolint reason * add reasonable deprecation message * remove junk edits * add more nolints * addressing review comments * Update pkg/services/featuremgmt/models.go Co-authored-by: Dave Henderson <dave.henderson@grafana.com> --------- Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
co-authored by
Dave Henderson
parent
4cea71ee73
commit
81683d554d
@@ -63,9 +63,11 @@ func RegisterAPIService(
|
||||
reg prometheus.Registerer,
|
||||
) (*DataSourceAPIBuilder, error) {
|
||||
// We want to expose just a limited set of plugins
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
explicitPluginList := features.IsEnabledGlobally(featuremgmt.FlagDatasourceAPIServers)
|
||||
|
||||
// This requires devmode!
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
if !explicitPluginList && !features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs) {
|
||||
return nil, nil // skip registration unless opting into experimental apis
|
||||
}
|
||||
@@ -111,6 +113,7 @@ func RegisterAPIService(
|
||||
datasources.GetDatasourceProvider(pluginJSON),
|
||||
contextProvider,
|
||||
accessControl,
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
features.IsEnabledGlobally(featuremgmt.FlagDatasourceQueryTypes),
|
||||
false,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user