From db83eb30a257f8f6375c4249793826b4a1a11963 Mon Sep 17 00:00:00 2001 From: Michael Mandrus <41969079+mmandrus@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:53:25 -0500 Subject: [PATCH] Caching: Remove useCachingService feature toggle (#80695) remove useCachingService feature toggle --- .../configure-grafana/feature-toggles/index.md | 3 +-- .../grafana-data/src/types/featureToggles.gen.ts | 1 - pkg/services/featuremgmt/registry.go | 12 +----------- pkg/services/featuremgmt/toggles_gen.csv | 1 - pkg/services/featuremgmt/toggles_gen.go | 6 +----- .../pluginsintegration/pluginsintegration.go | 6 +----- 6 files changed, 4 insertions(+), 25 deletions(-) diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index 707b05659ea..4d854d2c1a8 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -41,14 +41,13 @@ Some features are enabled by default. You can disable these feature by setting t | `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 | | `lokiMetricDataplane` | Changes metric responses from Loki to be compliant with the dataplane specification. | Yes | | `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes | -| `useCachingService` | When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation. | Yes | | `enableElasticsearchBackendQuerying` | Enable the processing of queries and responses in the Elasticsearch data source through backend | Yes | | `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order and advanced mode | Yes | | `cloudWatchLogsMonacoEditor` | Enables the Monaco editor for CloudWatch Logs queries | Yes | | `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | Yes | | `transformationsRedesign` | Enables the transformations redesign | Yes | | `grafanaAPIServer` | Enable Kubernetes API Server for Grafana resources | Yes | -| `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 | +| `awsAsyncQueryCaching` | Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled | Yes | | `splitScopes` | Support faster dashboard and folder search by splitting permission scopes into parts | Yes | | `prometheusConfigOverhaulAuth` | Update the Prometheus configuration page with the new auth component | Yes | | `influxdbSqlSupport` | Enable InfluxDB SQL query language support with new querying UI | Yes | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 23965542e01..3ffe34d4607 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -78,7 +78,6 @@ export interface FeatureToggles { renderAuthJWT?: boolean; externalServiceAuth?: boolean; refactorVariablesTimeRange?: boolean; - useCachingService?: boolean; enableElasticsearchBackendQuerying?: boolean; advancedDataSourcePicker?: boolean; faroDatasourceSelector?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 7cfea546948..b79a0758e28 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -512,16 +512,6 @@ var ( HideFromAdminPage: true, // Non-feature, used to test out a bug fix that impacts the performance of template variables. Created: time.Date(2023, time.June, 6, 12, 0, 0, 0, time.UTC), }, - { - Name: "useCachingService", - Description: "When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation.", - Stage: FeatureStageGeneralAvailability, - Owner: grafanaOperatorExperienceSquad, - RequiresRestart: true, - Expression: "true", // enabled by default - AllowSelfServe: false, - Created: time.Date(2023, time.April, 12, 12, 0, 0, 0, time.UTC), - }, { Name: "enableElasticsearchBackendQuerying", Description: "Enable the processing of queries and responses in the Elasticsearch data source through backend", @@ -753,7 +743,7 @@ var ( }, { Name: "awsAsyncQueryCaching", - 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", + Description: "Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled", Stage: FeatureStageGeneralAvailability, Expression: "true", // enabled by default Owner: awsDatasourcesSquad, diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 9b896c5298f..b82b9f5cab6 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -59,7 +59,6 @@ unifiedRequestLog,experimental,@grafana/backend-platform,2023-03-31,false,false, renderAuthJWT,preview,@grafana/grafana-as-code,2023-04-03,false,false,false,false externalServiceAuth,experimental,@grafana/identity-access-team,2023-04-11,true,false,false,false refactorVariablesTimeRange,preview,@grafana/dashboards-squad,2023-06-06,false,false,false,false -useCachingService,GA,@grafana/grafana-operator-experience-squad,2023-04-12,false,false,true,false enableElasticsearchBackendQuerying,GA,@grafana/observability-logs,2023-04-14,false,false,false,false advancedDataSourcePicker,GA,@grafana/dashboards-squad,2023-04-14,false,false,false,true faroDatasourceSelector,preview,@grafana/app-o11y,2023-05-04,false,false,false,true diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index ad24f971057..8e692548599 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -247,10 +247,6 @@ const ( // Refactor time range variables flow to reduce number of API calls made when query variables are chained FlagRefactorVariablesTimeRange = "refactorVariablesTimeRange" - // FlagUseCachingService - // When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation. - FlagUseCachingService = "useCachingService" - // FlagEnableElasticsearchBackendQuerying // Enable the processing of queries and responses in the Elasticsearch data source through backend FlagEnableElasticsearchBackendQuerying = "enableElasticsearchBackendQuerying" @@ -360,7 +356,7 @@ const ( FlagFeatureToggleAdminPage = "featureToggleAdminPage" // FlagAwsAsyncQueryCaching - // 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 + // Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled FlagAwsAsyncQueryCaching = "awsAsyncQueryCaching" // FlagSplitScopes diff --git a/pkg/services/pluginsintegration/pluginsintegration.go b/pkg/services/pluginsintegration/pluginsintegration.go index f1c24607614..ae43c16369b 100644 --- a/pkg/services/pluginsintegration/pluginsintegration.go +++ b/pkg/services/pluginsintegration/pluginsintegration.go @@ -172,13 +172,9 @@ func CreateMiddlewares(cfg *setting.Cfg, oAuthTokenService oauthtoken.OAuthToken clientmiddleware.NewOAuthTokenMiddleware(oAuthTokenService), clientmiddleware.NewCookiesMiddleware(skipCookiesNames), clientmiddleware.NewResourceResponseMiddleware(), + clientmiddleware.NewCachingMiddlewareWithFeatureManager(cachingService, features), ) - // Placing the new service implementation behind a feature flag until it is known to be stable - if features.IsEnabledGlobally(featuremgmt.FlagUseCachingService) { - middlewares = append(middlewares, clientmiddleware.NewCachingMiddlewareWithFeatureManager(cachingService, features)) - } - if features.IsEnabledGlobally(featuremgmt.FlagIdForwarding) { middlewares = append(middlewares, clientmiddleware.NewForwardIDMiddleware()) }