From 7aa747eb7b315e6c2a975c8eac9f52535f96ed25 Mon Sep 17 00:00:00 2001 From: Michael Mandrus <41969079+mmandrus@users.noreply.github.com> Date: Fri, 10 Jan 2025 06:28:35 -0500 Subject: [PATCH] CloudMigrations: Enable feature toggle by default in 11.5 (#98686) * update toggle state for 11.5 * remove unneeded e2c toggle * remove public preview condition * regen some stuff --- .../configure-grafana/feature-toggles/index.md | 2 +- pkg/apis/featuretoggle/v0alpha1/types.go | 2 +- pkg/apis/featuretoggle/v0alpha1/zz_generated.openapi.go | 2 +- pkg/services/featuremgmt/registry.go | 4 ++-- pkg/services/featuremgmt/toggles_gen.go | 2 +- pkg/services/featuremgmt/toggles_gen.json | 8 ++++---- pkg/services/featuremgmt/toggles_gen_test.go | 4 ++-- 7 files changed, 12 insertions(+), 12 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 1fdff6ae47e..09b70ac31e6 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -115,7 +115,7 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general- | `pdfTables` | Enables generating table data as PDF in reporting | | `canvasPanelPanZoom` | Allow pan and zoom in canvas panel | | `regressionTransformation` | Enables regression analysis transformation | -| `onPremToCloudMigrations` | Enable the Grafana Migration Assistant, which helps you easily migrate on-prem dashboards, folders, and data source configurations to your Grafana Cloud stack. | +| `onPremToCloudMigrations` | Enable the Grafana Migration Assistant, which helps you easily migrate on-prem resources, such as dashboards, folders, and data source configurations, to your Grafana Cloud stack. | | `ssoSettingsSAML` | Use the new SSO Settings API to configure the SAML connector | | `azureMonitorPrometheusExemplars` | Allows configuration of Azure Monitor as a data source that can provide Prometheus exemplars | | `ssoSettingsLDAP` | Use the new SSO Settings API to configure LDAP | diff --git a/pkg/apis/featuretoggle/v0alpha1/types.go b/pkg/apis/featuretoggle/v0alpha1/types.go index af393bb23de..e13ce27f80d 100644 --- a/pkg/apis/featuretoggle/v0alpha1/types.go +++ b/pkg/apis/featuretoggle/v0alpha1/types.go @@ -47,7 +47,7 @@ type FeatureSpec struct { // Do not show the value in docs HideFromDocs bool `json:"hideFromDocs,omitempty"` - // Expression to determine if the flag is enabled by default + // Expression to determine if the flag is enabled by default -- can only be "true" for toggles that are public preview, generally available, or deprecated Expression string `json:"expression,omitempty"` } diff --git a/pkg/apis/featuretoggle/v0alpha1/zz_generated.openapi.go b/pkg/apis/featuretoggle/v0alpha1/zz_generated.openapi.go index 0e84f57d84b..e5aa7fb63dd 100644 --- a/pkg/apis/featuretoggle/v0alpha1/zz_generated.openapi.go +++ b/pkg/apis/featuretoggle/v0alpha1/zz_generated.openapi.go @@ -192,7 +192,7 @@ func schema_pkg_apis_featuretoggle_v0alpha1_FeatureSpec(ref common.ReferenceCall }, "expression": { SchemaProps: spec.SchemaProps{ - Description: "Expression to determine if the flag is enabled by default", + Description: "Expression to determine if the flag is enabled by default -- can only be \"true\" for toggles that are public preview, generally available, or deprecated", Type: []string{"string"}, Format: "", }, diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 1327e2a0a02..2776923bbe7 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1028,10 +1028,10 @@ var ( }, { Name: "onPremToCloudMigrations", - Description: "Enable the Grafana Migration Assistant, which helps you easily migrate on-prem dashboards, folders, and data source configurations to your Grafana Cloud stack.", + Description: "Enable the Grafana Migration Assistant, which helps you easily migrate on-prem resources, such as dashboards, folders, and data source configurations, to your Grafana Cloud stack.", Stage: FeatureStagePublicPreview, Owner: grafanaOperatorExperienceSquad, - Expression: "false", + Expression: "true", }, { Name: "onPremToCloudMigrationsAuthApiMig", diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index d0c13cd0dd1..15615506aca 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -552,7 +552,7 @@ const ( FlagJitterAlertRulesWithinGroups = "jitterAlertRulesWithinGroups" // FlagOnPremToCloudMigrations - // Enable the Grafana Migration Assistant, which helps you easily migrate on-prem dashboards, folders, and data source configurations to your Grafana Cloud stack. + // Enable the Grafana Migration Assistant, which helps you easily migrate on-prem resources, such as dashboards, folders, and data source configurations, to your Grafana Cloud stack. FlagOnPremToCloudMigrations = "onPremToCloudMigrations" // FlagOnPremToCloudMigrationsAuthApiMig diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 6c62dfbdd6b..36b6452c5ea 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -2598,17 +2598,17 @@ { "metadata": { "name": "onPremToCloudMigrations", - "resourceVersion": "1721693547668", + "resourceVersion": "1736458171023", "creationTimestamp": "2024-01-22T16:09:08Z", "annotations": { - "grafana.app/updatedTimestamp": "2024-07-23 00:12:27.668899 +0000 UTC" + "grafana.app/updatedTimestamp": "2025-01-09 21:29:31.023464 +0000 UTC" } }, "spec": { - "description": "Enable the Grafana Migration Assistant, which helps you easily migrate on-prem dashboards, folders, and data source configurations to your Grafana Cloud stack.", + "description": "Enable the Grafana Migration Assistant, which helps you easily migrate on-prem resources, such as dashboards, folders, and data source configurations, to your Grafana Cloud stack.", "stage": "preview", "codeowner": "@grafana/grafana-operator-experience-squad", - "expression": "false" + "expression": "true" } }, { diff --git a/pkg/services/featuremgmt/toggles_gen_test.go b/pkg/services/featuremgmt/toggles_gen_test.go index a96b1b5359b..84319348eda 100644 --- a/pkg/services/featuremgmt/toggles_gen_test.go +++ b/pkg/services/featuremgmt/toggles_gen_test.go @@ -172,8 +172,8 @@ func verifyFlagsConfiguration(t *testing.T) { // Check that all flags set in code are valid for _, flag := range standardFeatureFlags { - if flag.Expression == "true" && !(flag.Stage == FeatureStageGeneralAvailability || flag.Stage == FeatureStageDeprecated) { - t.Errorf("only FeatureStageGeneralAvailability or FeatureStageDeprecated features can be enabled by default. See: %s", flag.Name) + if flag.Expression == "true" && !(flag.Stage == FeatureStageGeneralAvailability || flag.Stage == FeatureStageDeprecated || flag.Stage == FeatureStagePublicPreview) { + t.Errorf("only features that are FeatureStagePublicPreview, FeatureStageGeneralAvailability, or FeatureStageDeprecated can be enabled by default. See: %s", flag.Name) } if flag.RequiresDevMode && flag.Stage != FeatureStageExperimental { t.Errorf("only alpha features can require dev mode. See: %s", flag.Name)