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 5dae76b7c47..c04f6921c24 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -137,7 +137,6 @@ Experimental features might be changed or removed without prior notice. | `logRequestsInstrumentedAsUnknown` | Logs the path for requests that are instrumented as unknown | | `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema | | `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query | -| `mysqlParseTime` | Ensure the parseTime flag is set for MySQL driver | | `alertingBacktesting` | Rule backtesting API for alerting | | `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files | | `lokiShardSplitting` | Use stream shards to split queries into smaller subqueries | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index d7702e76152..37c84438f1f 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -43,7 +43,6 @@ export interface FeatureToggles { cloudWatchCrossAccountQuerying?: boolean; showDashboardValidationWarnings?: boolean; mysqlAnsiQuotes?: boolean; - mysqlParseTime?: boolean; accessControlOnCall?: boolean; nestedFolders?: boolean; alertingBacktesting?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 9a087268a45..8a1eb2c3477 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -198,12 +198,6 @@ var ( Stage: FeatureStageExperimental, Owner: grafanaSearchAndStorageSquad, }, - { - Name: "mysqlParseTime", - Description: "Ensure the parseTime flag is set for MySQL driver", - Stage: FeatureStageExperimental, - Owner: grafanaSearchAndStorageSquad, - }, { Name: "accessControlOnCall", Description: "Access control primitives for OnCall", diff --git a/pkg/services/featuremgmt/toggles-gitlog.csv b/pkg/services/featuremgmt/toggles-gitlog.csv index 7ef568102f2..482cc66b6bb 100644 --- a/pkg/services/featuremgmt/toggles-gitlog.csv +++ b/pkg/services/featuremgmt/toggles-gitlog.csv @@ -350,7 +350,6 @@ prometheusRunQueriesInParallel,2024-08-12T12:31:39Z,,c9ddc688a2b2c4ebb49e8ecf71d backgroundPluginInstaller,2024-08-12T14:39:31Z,2024-09-23T13:49:18Z,d342e76f636e3a5751c5e7baccd1c8910b50d863,Andres Martinez Gotor pluginsDetailsRightPanel,2024-08-13T09:55:30Z,,8044cb50f17a021a32e7ac0b83cf8d723457a9ae,Yulia Shanyrova lokiSendDashboardPanelNames,2024-08-22T19:30:43Z,,ec857e1de99d228668e3fb2c0bfd30230a96e180,Sven Grossmann -mysqlParseTime,2024-08-27T11:16:04Z,,c59dddf7afb227f756259a50fc1d2b1946a4a72f,Ryan McKinley singleTopNav,2024-08-29T08:48:32Z,,8aaa155cb0215119d2455732a9e37f7c2aeff35c,Laura Fernández exploreLogsAggregatedMetrics,2024-08-29T13:55:59Z,,15a4ff992bd925f5714bc4e73fa9766a995b5711,Sven Grossmann exploreLogsLimitedTimeRange,2024-08-29T13:55:59Z,,15a4ff992bd925f5714bc4e73fa9766a995b5711,Sven Grossmann diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index c992152469b..cd8f3b3cfb4 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -24,7 +24,6 @@ grpcServer,preview,@grafana/search-and-storage,false,false,false cloudWatchCrossAccountQuerying,GA,@grafana/aws-datasources,false,false,false showDashboardValidationWarnings,experimental,@grafana/dashboards-squad,false,false,false mysqlAnsiQuotes,experimental,@grafana/search-and-storage,false,false,false -mysqlParseTime,experimental,@grafana/search-and-storage,false,false,false accessControlOnCall,GA,@grafana/identity-access-team,false,false,false nestedFolders,GA,@grafana/search-and-storage,false,false,false alertingBacktesting,experimental,@grafana/alerting-squad,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 06f2cb22dea..4ba518fe8e9 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -107,10 +107,6 @@ const ( // Use double quotes to escape keyword in a MySQL query FlagMysqlAnsiQuotes = "mysqlAnsiQuotes" - // FlagMysqlParseTime - // Ensure the parseTime flag is set for MySQL driver - FlagMysqlParseTime = "mysqlParseTime" - // FlagAccessControlOnCall // Access control primitives for OnCall FlagAccessControlOnCall = "accessControlOnCall" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 33f7e351daa..4fc648bc0ce 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -2283,18 +2283,6 @@ "codeowner": "@grafana/search-and-storage" } }, - { - "metadata": { - "name": "mysqlParseTime", - "resourceVersion": "1724750152191", - "creationTimestamp": "2024-08-27T11:16:04Z" - }, - "spec": { - "description": "Ensure the parseTime flag is set for MySQL driver", - "stage": "experimental", - "codeowner": "@grafana/search-and-storage" - } - }, { "metadata": { "name": "nestedFolders", diff --git a/pkg/services/searchV2/index_test.go b/pkg/services/searchV2/index_test.go index 976233f7a07..8370245d0b5 100644 --- a/pkg/services/searchV2/index_test.go +++ b/pkg/services/searchV2/index_test.go @@ -793,7 +793,6 @@ func TestIntegrationSoftDeletion(t *testing.T) { featureToggles := featuremgmt.WithFeatures( featuremgmt.FlagPanelTitleSearch, featuremgmt.FlagDashboardRestore, - featuremgmt.FlagMysqlParseTime, ) dashboardStore, err := database.ProvideDashboardStore(sqlStore, cfg, featureToggles, tagimpl.ProvideService(sqlStore), quotaService) require.NoError(t, err) diff --git a/pkg/services/sqlstore/sqlstore.go b/pkg/services/sqlstore/sqlstore.go index 3b150ad5e95..5bf308d6417 100644 --- a/pkg/services/sqlstore/sqlstore.go +++ b/pkg/services/sqlstore/sqlstore.go @@ -284,7 +284,7 @@ func (ss *SQLStore) initEngine(engine *xorm.Engine) error { } if engine == nil { // Ensure that parseTime is enabled for MySQL - if ss.features.IsEnabledGlobally(featuremgmt.FlagMysqlParseTime) && strings.Contains(ss.dbCfg.Type, migrator.MySQL) && !strings.Contains(ss.dbCfg.ConnectionString, "parseTime=") { + if strings.Contains(ss.dbCfg.Type, migrator.MySQL) && !strings.Contains(ss.dbCfg.ConnectionString, "parseTime=") { if strings.Contains(ss.dbCfg.ConnectionString, "?") { ss.dbCfg.ConnectionString += "&parseTime=true" } else { @@ -490,7 +490,6 @@ func getCfgForTesting(opts ...InitTestDBOpt) *setting.Cfg { func getFeaturesForTesting(opts ...InitTestDBOpt) featuremgmt.FeatureToggles { featureKeys := []any{ featuremgmt.FlagPanelTitleSearch, - featuremgmt.FlagMysqlParseTime, } for _, opt := range opts { if len(opt.FeatureFlags) > 0 { diff --git a/pkg/services/sqlstore/sqlstore_test.go b/pkg/services/sqlstore/sqlstore_test.go index f08eb345570..4b5af7b194b 100644 --- a/pkg/services/sqlstore/sqlstore_test.go +++ b/pkg/services/sqlstore/sqlstore_test.go @@ -76,42 +76,30 @@ func TestInitEngine_ParseTimeInConnectionString(t *testing.T) { name string connectionString string dbType string - featureEnabled bool expectedConnection string }{ { name: "MySQL with parseTime already present", connectionString: "mysql://user:password@localhost:3306/alreadypresent?parseTime=false", dbType: "mysql", - featureEnabled: true, expectedConnection: "user:password@tcp(localhost:3306)/alreadypresent?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&parseTime=false", }, { name: "MySQL with feature enabled", connectionString: "mysql://user:password@localhost:3306/existingparams?charset=utf8", dbType: "mysql", - featureEnabled: true, expectedConnection: "user:password@tcp(localhost:3306)/existingparams?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&charset=utf8&parseTime=true", }, { name: "MySQL with feature enabled", connectionString: "mysql://user:password@localhost:3306/existingparams?charset=utf8", dbType: "mysqlWithHooks", - featureEnabled: true, expectedConnection: "user:password@tcp(localhost:3306)/existingparams?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&charset=utf8&parseTime=true", }, - { - name: "MySQL with feature disabled", - connectionString: "mysql://user:password@localhost:3306/disabled", - dbType: "mysql", - featureEnabled: false, - expectedConnection: "user:password@tcp(localhost:3306)/disabled?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true", - }, { name: "Postgres", connectionString: "postgres://username:password@localhost:5432/mydatabase", dbType: "postgres", - featureEnabled: true, expectedConnection: "user=username host=localhost port=5432 dbname=mydatabase sslmode='' sslcert='' sslkey='' sslrootcert='' password=password", }, } @@ -124,9 +112,6 @@ func TestInitEngine_ParseTimeInConnectionString(t *testing.T) { require.NoError(t, err) ftMgr := featuremgmt.WithFeatures() - if tt.featureEnabled { - ftMgr = featuremgmt.WithFeatures(featuremgmt.FlagMysqlParseTime) - } ss := &SQLStore{ cfg: &setting.Cfg{