mirror of
https://github.com/grafana/grafana.git
synced 2026-08-26 13:27:30 -05:00
Chore: Remvoe newDBLibrary feature flag (#78074)
This commit is contained in:
@@ -60,7 +60,6 @@ Some features are enabled by default. You can disable these feature by setting t
|
|||||||
| `panelTitleSearch` | Search for dashboards using panel title |
|
| `panelTitleSearch` | Search for dashboards using panel title |
|
||||||
| `migrationLocking` | Lock database during migrations |
|
| `migrationLocking` | Lock database during migrations |
|
||||||
| `correlations` | Correlations page |
|
| `correlations` | Correlations page |
|
||||||
| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services |
|
|
||||||
| `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) |
|
| `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) |
|
||||||
| `disableAngular` | Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. |
|
| `disableAngular` | Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. |
|
||||||
| `grpcServer` | Run the GRPC server |
|
| `grpcServer` | Run the GRPC server |
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ export interface FeatureToggles {
|
|||||||
exploreContentOutline?: boolean;
|
exploreContentOutline?: boolean;
|
||||||
datasourceQueryMultiStatus?: boolean;
|
datasourceQueryMultiStatus?: boolean;
|
||||||
traceToMetrics?: boolean;
|
traceToMetrics?: boolean;
|
||||||
newDBLibrary?: boolean;
|
|
||||||
autoMigrateOldPanels?: boolean;
|
autoMigrateOldPanels?: boolean;
|
||||||
disableAngular?: boolean;
|
disableAngular?: boolean;
|
||||||
canvasPanelNesting?: boolean;
|
canvasPanelNesting?: boolean;
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ type DB interface {
|
|||||||
GetEngine() *xorm.Engine
|
GetEngine() *xorm.Engine
|
||||||
// GetSqlxSession is an experimental extension to use sqlx instead of xorm to
|
// GetSqlxSession is an experimental extension to use sqlx instead of xorm to
|
||||||
// communicate with the database.
|
// communicate with the database.
|
||||||
|
// NOTE: when using this session with mysql, the connection will *not* have:
|
||||||
|
// the expected parameters: "&sql_mode='ANSI_QUOTES" and "&parseTime=true"
|
||||||
|
// The sqlx session is useful, but be careful not to expect automagic date parsing
|
||||||
GetSqlxSession() *session.SessionDB
|
GetSqlxSession() *session.SessionDB
|
||||||
// InTransaction creates a new SQL transaction that is placed on the context.
|
// InTransaction creates a new SQL transaction that is placed on the context.
|
||||||
// Use together with [DB.WithDbSession] to run database operations.
|
// Use together with [DB.WithDbSession] to run database operations.
|
||||||
|
|||||||
@@ -107,12 +107,6 @@ var (
|
|||||||
FrontendOnly: true,
|
FrontendOnly: true,
|
||||||
Owner: grafanaObservabilityTracesAndProfilingSquad,
|
Owner: grafanaObservabilityTracesAndProfilingSquad,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Name: "newDBLibrary",
|
|
||||||
Description: "Use jmoiron/sqlx rather than xorm for a few backend services",
|
|
||||||
Stage: FeatureStagePublicPreview,
|
|
||||||
Owner: grafanaBackendPlatformSquad,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Name: "autoMigrateOldPanels",
|
Name: "autoMigrateOldPanels",
|
||||||
Description: "Migrate old angular panels to supported versions (graph, table-old, worldmap, etc)",
|
Description: "Migrate old angular panels to supported versions (graph, table-old, worldmap, etc)",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ correlations,preview,@grafana/explore-squad,false,false,false,false
|
|||||||
exploreContentOutline,GA,@grafana/explore-squad,false,false,false,true
|
exploreContentOutline,GA,@grafana/explore-squad,false,false,false,true
|
||||||
datasourceQueryMultiStatus,experimental,@grafana/plugins-platform-backend,false,false,false,false
|
datasourceQueryMultiStatus,experimental,@grafana/plugins-platform-backend,false,false,false,false
|
||||||
traceToMetrics,experimental,@grafana/observability-traces-and-profiling,false,false,false,true
|
traceToMetrics,experimental,@grafana/observability-traces-and-profiling,false,false,false,true
|
||||||
newDBLibrary,preview,@grafana/backend-platform,false,false,false,false
|
|
||||||
autoMigrateOldPanels,preview,@grafana/dataviz-squad,false,false,false,true
|
autoMigrateOldPanels,preview,@grafana/dataviz-squad,false,false,false,true
|
||||||
disableAngular,preview,@grafana/dataviz-squad,false,false,false,true
|
disableAngular,preview,@grafana/dataviz-squad,false,false,false,true
|
||||||
canvasPanelNesting,experimental,@grafana/dataviz-squad,false,false,false,true
|
canvasPanelNesting,experimental,@grafana/dataviz-squad,false,false,false,true
|
||||||
|
|||||||
|
@@ -63,10 +63,6 @@ const (
|
|||||||
// Enable trace to metrics links
|
// Enable trace to metrics links
|
||||||
FlagTraceToMetrics = "traceToMetrics"
|
FlagTraceToMetrics = "traceToMetrics"
|
||||||
|
|
||||||
// FlagNewDBLibrary
|
|
||||||
// Use jmoiron/sqlx rather than xorm for a few backend services
|
|
||||||
FlagNewDBLibrary = "newDBLibrary"
|
|
||||||
|
|
||||||
// FlagAutoMigrateOldPanels
|
// FlagAutoMigrateOldPanels
|
||||||
// Migrate old angular panels to supported versions (graph, table-old, worldmap, etc)
|
// Migrate old angular panels to supported versions (graph, table-old, worldmap, etc)
|
||||||
FlagAutoMigrateOldPanels = "autoMigrateOldPanels"
|
FlagAutoMigrateOldPanels = "autoMigrateOldPanels"
|
||||||
|
|||||||
@@ -308,15 +308,10 @@ func (ss *SQLStore) buildConnectionString() (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// nolint:staticcheck
|
// nolint:staticcheck
|
||||||
if ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagMysqlAnsiQuotes) || ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagNewDBLibrary) {
|
if ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagMysqlAnsiQuotes) {
|
||||||
cnnstr += "&sql_mode='ANSI_QUOTES'"
|
cnnstr += "&sql_mode='ANSI_QUOTES'"
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint:staticcheck
|
|
||||||
if ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagNewDBLibrary) {
|
|
||||||
cnnstr += "&parseTime=true"
|
|
||||||
}
|
|
||||||
|
|
||||||
cnnstr += ss.buildExtraConnectionString('&')
|
cnnstr += ss.buildExtraConnectionString('&')
|
||||||
case migrator.Postgres:
|
case migrator.Postgres:
|
||||||
addr, err := util.SplitHostPortDefault(ss.dbCfg.Host, "127.0.0.1", "5432")
|
addr, err := util.SplitHostPortDefault(ss.dbCfg.Host, "127.0.0.1", "5432")
|
||||||
|
|||||||
@@ -104,13 +104,6 @@ var sqlStoreTestCases = []sqlStoreTest{
|
|||||||
features: featuremgmt.WithFeatures(featuremgmt.FlagMysqlAnsiQuotes),
|
features: featuremgmt.WithFeatures(featuremgmt.FlagMysqlAnsiQuotes),
|
||||||
expConnStr: ":@tcp([::1])/test_db?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&sql_mode='ANSI_QUOTES'",
|
expConnStr: ":@tcp([::1])/test_db?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&sql_mode='ANSI_QUOTES'",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "New DB library",
|
|
||||||
dbType: "mysql",
|
|
||||||
dbHost: "[::1]",
|
|
||||||
features: featuremgmt.WithFeatures(featuremgmt.FlagNewDBLibrary),
|
|
||||||
expConnStr: ":@tcp([::1])/test_db?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&sql_mode='ANSI_QUOTES'&parseTime=true",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIntegrationSQLConnectionString(t *testing.T) {
|
func TestIntegrationSQLConnectionString(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user