mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove mysqlParseTime feature toggle (#97761)
This commit is contained in:
parent
db8ece3167
commit
f05d016ae7
@ -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 |
|
||||
|
@ -43,7 +43,6 @@ export interface FeatureToggles {
|
||||
cloudWatchCrossAccountQuerying?: boolean;
|
||||
showDashboardValidationWarnings?: boolean;
|
||||
mysqlAnsiQuotes?: boolean;
|
||||
mysqlParseTime?: boolean;
|
||||
accessControlOnCall?: boolean;
|
||||
nestedFolders?: boolean;
|
||||
alertingBacktesting?: boolean;
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
@ -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",
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user