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
@@ -333,6 +333,7 @@ func (s *Service) buildGraph(ctx context.Context, req *Request) (*simple.Directe
|
||||
case TypeCMDNode:
|
||||
node, err = buildCMDNode(ctx, rn, s.features, s.cfg)
|
||||
case TypeMLNode:
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
if s.features.IsEnabledGlobally(featuremgmt.FlagMlExpressions) {
|
||||
node, err = s.buildMLNode(dp, rn, req)
|
||||
if err != nil {
|
||||
|
||||
@@ -124,6 +124,7 @@ func buildCMDNode(ctx context.Context, rn *rawNode, toggles featuremgmt.FeatureT
|
||||
}
|
||||
|
||||
if commandType == TypeSQL {
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
if !toggles.IsEnabledGlobally(featuremgmt.FlagSqlExpressions) {
|
||||
return nil, fmt.Errorf("sql expressions are disabled")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user