From 712314e8324fd86ec33ecb840f868eb1f1cac154 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Mon, 7 Oct 2024 12:53:24 +0200 Subject: [PATCH] CloudMigrations: create `onPremToCloudMigrationsAlerts` feature toggle in experimental stage (#94257) CloudMigrations: create onPremToCloudMigrationsAlerts feature toggle in experimental stage This feature toggle requires the `onPremToCloudMigrations` toggle to be enabled in order to work. Given migration of Alerts (and child resources) is more critical, this flag was separated from the main one. --- .../configure-grafana/feature-toggles/index.md | 1 + .../grafana-data/src/types/featureToggles.gen.ts | 1 + pkg/services/featuremgmt/registry.go | 6 ++++++ pkg/services/featuremgmt/toggles_gen.csv | 1 + pkg/services/featuremgmt/toggles_gen.go | 4 ++++ pkg/services/featuremgmt/toggles_gen.json | 14 +++++++++++++- 6 files changed, 26 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 696a9458a9c..ef8bc6a3396 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -182,6 +182,7 @@ Experimental features might be changed or removed without prior notice. | `tableSharedCrosshair` | Enables shared crosshair in table panel | | `kubernetesFeatureToggles` | Use the kubernetes API for feature toggle management in the frontend | | `newFolderPicker` | Enables the nested folder picker without having nested folders enabled | +| `onPremToCloudMigrationsAlerts` | Enables the migration of alerts and its child resources to your Grafana Cloud stack. Requires `onPremToCloudMigrations` to be enabled in conjunction. | | `sqlExpressions` | Enables using SQL and DuckDB functions as Expressions. | | `nodeGraphDotLayout` | Changed the layout algorithm for the node graph | | `kubernetesAggregator` | Enable grafana's embedded kube-aggregator | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 7371f32a641..b8124c22120 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -158,6 +158,7 @@ export interface FeatureToggles { newFolderPicker?: boolean; jitterAlertRulesWithinGroups?: boolean; onPremToCloudMigrations?: boolean; + onPremToCloudMigrationsAlerts?: boolean; alertingSaveStatePeriodic?: boolean; promQLScope?: boolean; sqlExpressions?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index e8f6e5178ca..37b01669165 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1062,6 +1062,12 @@ var ( Owner: grafanaOperatorExperienceSquad, Expression: "false", }, + { + Name: "onPremToCloudMigrationsAlerts", + Description: "Enables the migration of alerts and its child resources to your Grafana Cloud stack. Requires `onPremToCloudMigrations` to be enabled in conjunction.", + Stage: FeatureStageExperimental, + Owner: grafanaOperatorExperienceSquad, + }, { Name: "alertingSaveStatePeriodic", Description: "Writes the state periodically to the database, asynchronous to rule evaluation", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 40c180cbb5c..f2aa25e774b 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -139,6 +139,7 @@ alertingQueryOptimization,GA,@grafana/alerting-squad,false,false,false newFolderPicker,experimental,@grafana/grafana-frontend-platform,false,false,true jitterAlertRulesWithinGroups,preview,@grafana/alerting-squad,false,true,false onPremToCloudMigrations,preview,@grafana/grafana-operator-experience-squad,false,false,false +onPremToCloudMigrationsAlerts,experimental,@grafana/grafana-operator-experience-squad,false,false,false alertingSaveStatePeriodic,privatePreview,@grafana/alerting-squad,false,false,false promQLScope,GA,@grafana/observability-metrics,false,false,false sqlExpressions,experimental,@grafana/grafana-app-platform-squad,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index ee1c81f5d0b..147d0f4681e 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -567,6 +567,10 @@ const ( // Enable the Grafana Migration Assistant, which helps you easily migrate on-prem dashboards, folders, and data source configurations to your Grafana Cloud stack. FlagOnPremToCloudMigrations = "onPremToCloudMigrations" + // FlagOnPremToCloudMigrationsAlerts + // Enables the migration of alerts and its child resources to your Grafana Cloud stack. Requires `onPremToCloudMigrations` to be enabled in conjunction. + FlagOnPremToCloudMigrationsAlerts = "onPremToCloudMigrationsAlerts" + // FlagAlertingSaveStatePeriodic // Writes the state periodically to the database, asynchronous to rule evaluation FlagAlertingSaveStatePeriodic = "alertingSaveStatePeriodic" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 2c4aaacdd4b..73bb3d77ea9 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -2163,6 +2163,18 @@ "expression": "false" } }, + { + "metadata": { + "name": "onPremToCloudMigrationsAlerts", + "resourceVersion": "1728048163201", + "creationTimestamp": "2024-10-04T13:22:43Z" + }, + "spec": { + "description": "Enables the migration of alerts and its child resources to your Grafana Cloud stack. Requires `onPremToCloudMigrations` to be enabled in conjunction.", + "stage": "experimental", + "codeowner": "@grafana/grafana-operator-experience-squad" + } + }, { "metadata": { "name": "openSearchBackendFlowEnabled", @@ -3127,4 +3139,4 @@ } } ] -} +} \ No newline at end of file