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
pull/98797/head
Michael Mandrus 6 months ago committed by GitHub
parent ae257246bc
commit 7aa747eb7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md
  2. 2
      pkg/apis/featuretoggle/v0alpha1/types.go
  3. 2
      pkg/apis/featuretoggle/v0alpha1/zz_generated.openapi.go
  4. 4
      pkg/services/featuremgmt/registry.go
  5. 2
      pkg/services/featuremgmt/toggles_gen.go
  6. 8
      pkg/services/featuremgmt/toggles_gen.json
  7. 4
      pkg/services/featuremgmt/toggles_gen_test.go

@ -115,7 +115,7 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
| `pdfTables` | Enables generating table data as PDF in reporting | | `pdfTables` | Enables generating table data as PDF in reporting |
| `canvasPanelPanZoom` | Allow pan and zoom in canvas panel | | `canvasPanelPanZoom` | Allow pan and zoom in canvas panel |
| `regressionTransformation` | Enables regression analysis transformation | | `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 | | `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 | | `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 | | `ssoSettingsLDAP` | Use the new SSO Settings API to configure LDAP |

@ -47,7 +47,7 @@ type FeatureSpec struct {
// Do not show the value in docs // Do not show the value in docs
HideFromDocs bool `json:"hideFromDocs,omitempty"` 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"` Expression string `json:"expression,omitempty"`
} }

@ -192,7 +192,7 @@ func schema_pkg_apis_featuretoggle_v0alpha1_FeatureSpec(ref common.ReferenceCall
}, },
"expression": { "expression": {
SchemaProps: spec.SchemaProps{ 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"}, Type: []string{"string"},
Format: "", Format: "",
}, },

@ -1028,10 +1028,10 @@ var (
}, },
{ {
Name: "onPremToCloudMigrations", 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, Stage: FeatureStagePublicPreview,
Owner: grafanaOperatorExperienceSquad, Owner: grafanaOperatorExperienceSquad,
Expression: "false", Expression: "true",
}, },
{ {
Name: "onPremToCloudMigrationsAuthApiMig", Name: "onPremToCloudMigrationsAuthApiMig",

@ -552,7 +552,7 @@ const (
FlagJitterAlertRulesWithinGroups = "jitterAlertRulesWithinGroups" FlagJitterAlertRulesWithinGroups = "jitterAlertRulesWithinGroups"
// FlagOnPremToCloudMigrations // 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" FlagOnPremToCloudMigrations = "onPremToCloudMigrations"
// FlagOnPremToCloudMigrationsAuthApiMig // FlagOnPremToCloudMigrationsAuthApiMig

@ -2598,17 +2598,17 @@
{ {
"metadata": { "metadata": {
"name": "onPremToCloudMigrations", "name": "onPremToCloudMigrations",
"resourceVersion": "1721693547668", "resourceVersion": "1736458171023",
"creationTimestamp": "2024-01-22T16:09:08Z", "creationTimestamp": "2024-01-22T16:09:08Z",
"annotations": { "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": { "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", "stage": "preview",
"codeowner": "@grafana/grafana-operator-experience-squad", "codeowner": "@grafana/grafana-operator-experience-squad",
"expression": "false" "expression": "true"
} }
}, },
{ {

@ -172,8 +172,8 @@ func verifyFlagsConfiguration(t *testing.T) {
// Check that all flags set in code are valid // Check that all flags set in code are valid
for _, flag := range standardFeatureFlags { for _, flag := range standardFeatureFlags {
if flag.Expression == "true" && !(flag.Stage == FeatureStageGeneralAvailability || flag.Stage == FeatureStageDeprecated) { if flag.Expression == "true" && !(flag.Stage == FeatureStageGeneralAvailability || flag.Stage == FeatureStageDeprecated || flag.Stage == FeatureStagePublicPreview) {
t.Errorf("only FeatureStageGeneralAvailability or FeatureStageDeprecated features can be enabled by default. See: %s", flag.Name) 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 { if flag.RequiresDevMode && flag.Stage != FeatureStageExperimental {
t.Errorf("only alpha features can require dev mode. See: %s", flag.Name) t.Errorf("only alpha features can require dev mode. See: %s", flag.Name)

Loading…
Cancel
Save