chore : Deprecating FeatureToggles.IsEnabled (#113062)
* Deprecating features.IsEnabled * add one more nolint * add one more nolint * Give better hints to devs in the deprecation message of IsEnabledGlobally * adding more doc strings * fix linter after rebase * Extend deprecation message
This commit is contained in:
@@ -29,6 +29,7 @@ func (c *ResultConverter) Convert(ctx context.Context,
|
||||
}
|
||||
|
||||
var dt data.FrameType
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
dt, useDataplane, _ := shouldUseDataplane(frames, logger, c.Features.IsEnabled(ctx, featuremgmt.FlagDisableSSEDataplane))
|
||||
if useDataplane {
|
||||
logger.Debug("Handling SSE data source query through dataplane", "datatype", dt)
|
||||
|
||||
@@ -70,6 +70,7 @@ func handleDataplaneFrames(ctx context.Context, tracer tracing.Tracer, features
|
||||
case data.KindTimeSeries:
|
||||
return handleDataplaneTimeseries(frames)
|
||||
case data.KindNumeric:
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
sortMetrics := !features.IsEnabled(ctx, featuremgmt.FlagDisableNumericMetricsSortingInExpressions)
|
||||
return handleDataplaneNumeric(frames, sortMetrics)
|
||||
default:
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ type DataPipeline []Node
|
||||
// map of the refId of the of each command
|
||||
func (dp *DataPipeline) execute(c context.Context, now time.Time, s *Service) (mathexp.Vars, error) {
|
||||
vars := make(mathexp.Vars)
|
||||
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
groupByDSFlag := s.features.IsEnabled(c, featuremgmt.FlagSseGroupByDatasource)
|
||||
// Execute datasource nodes first, and grouped by datasource.
|
||||
if groupByDSFlag {
|
||||
|
||||
Reference in New Issue
Block a user