From c3102c7d0a2507c70c4867288b268f5b27babf87 Mon Sep 17 00:00:00 2001 From: Michael Mandrus <41969079+mmandrus@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:00:37 -0400 Subject: [PATCH] Caching: Enable `useCachingService` feature toggle by default (#76845) * enable by default * update docs * add helpful comment --- .../setup-grafana/configure-grafana/feature-toggles/index.md | 2 +- pkg/services/featuremgmt/models.go | 2 ++ pkg/services/featuremgmt/registry.go | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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 3810ab99007..3be0262b871 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -41,7 +41,7 @@ Some features are enabled by default. You can disable these feature by setting t | `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 | | `alertingNotificationsPoliciesMatchingInstances` | Enables the preview of matching instances for notification policies | Yes | -| `useCachingService` | When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation. | | +| `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 | diff --git a/pkg/services/featuremgmt/models.go b/pkg/services/featuremgmt/models.go index 0666ed9a2ce..7f0324f6844 100644 --- a/pkg/services/featuremgmt/models.go +++ b/pkg/services/featuremgmt/models.go @@ -109,11 +109,13 @@ type FeatureFlag struct { // Special behavior flags RequiresDevMode bool `json:"requiresDevMode,omitempty"` // can not be enabled in production + // This flag is currently unused. RequiresRestart bool `json:"requiresRestart,omitempty"` // The server must be initialized with the value RequiresLicense bool `json:"requiresLicense,omitempty"` // Must be enabled in the license FrontendOnly bool `json:"frontend,omitempty"` // change is only seen in the frontend HideFromDocs bool `json:"hideFromDocs,omitempty"` // don't add the values to docs + // This field is only for the feature management API. To enable your feature toggle by default, use `Expression`. Enabled bool `json:"enabled,omitempty"` } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index cc21c71bbe7..cd8e800e4a2 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -437,6 +437,7 @@ var ( Stage: FeatureStageGeneralAvailability, Owner: grafanaOperatorExperienceSquad, RequiresRestart: true, + Expression: "true", // enabled by default }, { Name: "enableElasticsearchBackendQuerying",