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
@@ -166,6 +166,7 @@ func (dbCfg *DatabaseConfig) buildConnectionString(cfg *setting.Cfg, features fe
|
||||
cnnstr += fmt.Sprintf("&transaction_isolation=%s", val)
|
||||
}
|
||||
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
if features != nil && features.IsEnabledGlobally(featuremgmt.FlagMysqlAnsiQuotes) {
|
||||
cnnstr += "&sql_mode='ANSI_QUOTES'"
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ func (oss *OSSMigrations) AddMigration(mg *Migrator) {
|
||||
|
||||
ualert.CreateOrgMigratedKVStoreEntries(mg)
|
||||
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
// https://github.com/grafana/identity-access-team/issues/546: tracks removal of the feature toggle from the annotation permission migration
|
||||
if oss.features != nil && oss.features.IsEnabledGlobally(featuremgmt.FlagAnnotationPermissionUpdate) {
|
||||
accesscontrol.AddManagedDashboardAnnotationActionsMigration(mg)
|
||||
|
||||
@@ -102,6 +102,7 @@ func NewAccessControlDashboardPermissionFilter(user identity.Requester, permissi
|
||||
}
|
||||
|
||||
var f PermissionsFilter
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
if features.IsEnabledGlobally(featuremgmt.FlagPermissionsFilterRemoveSubquery) {
|
||||
f = &accessControlDashboardPermissionFilterNoFolderSubquery{
|
||||
accessControlDashboardPermissionFilter: accessControlDashboardPermissionFilter{
|
||||
|
||||
@@ -226,6 +226,7 @@ func newTestCfg(
|
||||
if cfg == nil {
|
||||
cfg = setting.NewCfg()
|
||||
}
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
cfg.IsFeatureToggleEnabled = features.IsEnabledGlobally
|
||||
|
||||
sec, err := cfg.Raw.NewSection("database")
|
||||
|
||||
Reference in New Issue
Block a user