Skip to content

Commit

Permalink
add feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmgot committed Sep 4, 2024
1 parent c5422eb commit 36f46cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/conversion_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (a *conversionSDKAdapter) ConvertObjects(ctx context.Context, req *pluginv2
resp, innerErr = a.handler.ConvertObjects(ctx, parsedReq)
return RequestStatusFromError(innerErr), innerErr
}
if a.queryConversionHandler != nil {
if a.queryConversionHandler != nil && GrafanaConfigFromContext(ctx).FeatureToggles().IsEnabled("dsQueryConvert") {
resp, innerErr = a.ConvertQueryDataFromObjects(ctx, parsedReq)
return RequestStatusFromError(innerErr), innerErr
}
Expand Down
2 changes: 1 addition & 1 deletion backend/data_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (a *dataSDKAdapter) QueryData(ctx context.Context, req *pluginv2.QueryDataR
err := wrapHandler(ctx, parsedReq.PluginContext, func(ctx context.Context) (RequestStatus, error) {
ctx = withHeaderMiddleware(ctx, parsedReq.GetHTTPHeaders())
var innerErr error
if a.queryConversionHandler != nil {
if a.queryConversionHandler != nil && GrafanaConfigFromContext(ctx).FeatureToggles().IsEnabled("dsQueryConvert") {
parsedReq, innerErr = a.ConvertQueryData(ctx, parsedReq)
if innerErr != nil {
return RequestStatusError, innerErr
Expand Down

0 comments on commit 36f46cd

Please sign in to comment.