Skip to content

Commit db83eb3

Browse files
authored
Caching: Remove useCachingService feature toggle (grafana#80695)
remove useCachingService feature toggle
1 parent f434467 commit db83eb3

File tree

6 files changed

+4
-25
lines changed

6 files changed

+4
-25
lines changed

docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,13 @@ Some features are enabled by default. You can disable these feature by setting t
4141
| `prometheusDataplane` | Changes responses to from Prometheus to be compliant with the dataplane specification. In particular, when this feature toggle is active, the numeric `Field.Name` is set from 'Value' to the value of the `__name__` label. | Yes |
4242
| `lokiMetricDataplane` | Changes metric responses from Loki to be compliant with the dataplane specification. | Yes |
4343
| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes |
44-
| `useCachingService` | When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation. | Yes |
4544
| `enableElasticsearchBackendQuerying` | Enable the processing of queries and responses in the Elasticsearch data source through backend | Yes |
4645
| `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order and advanced mode | Yes |
4746
| `cloudWatchLogsMonacoEditor` | Enables the Monaco editor for CloudWatch Logs queries | Yes |
4847
| `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | Yes |
4948
| `transformationsRedesign` | Enables the transformations redesign | Yes |
5049
| `grafanaAPIServer` | Enable Kubernetes API Server for Grafana resources | Yes |
51-
| `awsAsyncQueryCaching` | Enable caching for async queries for Redshift and Athena. Requires that the `useCachingService` feature toggle is enabled and the datasource has caching and async query support enabled | Yes |
50+
| `awsAsyncQueryCaching` | Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled | Yes |
5251
| `splitScopes` | Support faster dashboard and folder search by splitting permission scopes into parts | Yes |
5352
| `prometheusConfigOverhaulAuth` | Update the Prometheus configuration page with the new auth component | Yes |
5453
| `influxdbSqlSupport` | Enable InfluxDB SQL query language support with new querying UI | Yes |

packages/grafana-data/src/types/featureToggles.gen.ts

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export interface FeatureToggles {
7878
renderAuthJWT?: boolean;
7979
externalServiceAuth?: boolean;
8080
refactorVariablesTimeRange?: boolean;
81-
useCachingService?: boolean;
8281
enableElasticsearchBackendQuerying?: boolean;
8382
advancedDataSourcePicker?: boolean;
8483
faroDatasourceSelector?: boolean;

pkg/services/featuremgmt/registry.go

+1-11
Original file line numberDiff line numberDiff line change
@@ -512,16 +512,6 @@ var (
512512
HideFromAdminPage: true, // Non-feature, used to test out a bug fix that impacts the performance of template variables.
513513
Created: time.Date(2023, time.June, 6, 12, 0, 0, 0, time.UTC),
514514
},
515-
{
516-
Name: "useCachingService",
517-
Description: "When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation.",
518-
Stage: FeatureStageGeneralAvailability,
519-
Owner: grafanaOperatorExperienceSquad,
520-
RequiresRestart: true,
521-
Expression: "true", // enabled by default
522-
AllowSelfServe: false,
523-
Created: time.Date(2023, time.April, 12, 12, 0, 0, 0, time.UTC),
524-
},
525515
{
526516
Name: "enableElasticsearchBackendQuerying",
527517
Description: "Enable the processing of queries and responses in the Elasticsearch data source through backend",
@@ -753,7 +743,7 @@ var (
753743
},
754744
{
755745
Name: "awsAsyncQueryCaching",
756-
Description: "Enable caching for async queries for Redshift and Athena. Requires that the `useCachingService` feature toggle is enabled and the datasource has caching and async query support enabled",
746+
Description: "Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled",
757747
Stage: FeatureStageGeneralAvailability,
758748
Expression: "true", // enabled by default
759749
Owner: awsDatasourcesSquad,

pkg/services/featuremgmt/toggles_gen.csv

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ unifiedRequestLog,experimental,@grafana/backend-platform,2023-03-31,false,false,
5959
renderAuthJWT,preview,@grafana/grafana-as-code,2023-04-03,false,false,false,false
6060
externalServiceAuth,experimental,@grafana/identity-access-team,2023-04-11,true,false,false,false
6161
refactorVariablesTimeRange,preview,@grafana/dashboards-squad,2023-06-06,false,false,false,false
62-
useCachingService,GA,@grafana/grafana-operator-experience-squad,2023-04-12,false,false,true,false
6362
enableElasticsearchBackendQuerying,GA,@grafana/observability-logs,2023-04-14,false,false,false,false
6463
advancedDataSourcePicker,GA,@grafana/dashboards-squad,2023-04-14,false,false,false,true
6564
faroDatasourceSelector,preview,@grafana/app-o11y,2023-05-04,false,false,false,true

pkg/services/featuremgmt/toggles_gen.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ const (
247247
// Refactor time range variables flow to reduce number of API calls made when query variables are chained
248248
FlagRefactorVariablesTimeRange = "refactorVariablesTimeRange"
249249

250-
// FlagUseCachingService
251-
// When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation.
252-
FlagUseCachingService = "useCachingService"
253-
254250
// FlagEnableElasticsearchBackendQuerying
255251
// Enable the processing of queries and responses in the Elasticsearch data source through backend
256252
FlagEnableElasticsearchBackendQuerying = "enableElasticsearchBackendQuerying"
@@ -360,7 +356,7 @@ const (
360356
FlagFeatureToggleAdminPage = "featureToggleAdminPage"
361357

362358
// FlagAwsAsyncQueryCaching
363-
// Enable caching for async queries for Redshift and Athena. Requires that the `useCachingService` feature toggle is enabled and the datasource has caching and async query support enabled
359+
// Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled
364360
FlagAwsAsyncQueryCaching = "awsAsyncQueryCaching"
365361

366362
// FlagSplitScopes

pkg/services/pluginsintegration/pluginsintegration.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,9 @@ func CreateMiddlewares(cfg *setting.Cfg, oAuthTokenService oauthtoken.OAuthToken
172172
clientmiddleware.NewOAuthTokenMiddleware(oAuthTokenService),
173173
clientmiddleware.NewCookiesMiddleware(skipCookiesNames),
174174
clientmiddleware.NewResourceResponseMiddleware(),
175+
clientmiddleware.NewCachingMiddlewareWithFeatureManager(cachingService, features),
175176
)
176177

177-
// Placing the new service implementation behind a feature flag until it is known to be stable
178-
if features.IsEnabledGlobally(featuremgmt.FlagUseCachingService) {
179-
middlewares = append(middlewares, clientmiddleware.NewCachingMiddlewareWithFeatureManager(cachingService, features))
180-
}
181-
182178
if features.IsEnabledGlobally(featuremgmt.FlagIdForwarding) {
183179
middlewares = append(middlewares, clientmiddleware.NewForwardIDMiddleware())
184180
}

0 commit comments

Comments
 (0)