Revert read replica POC (#93551)
* Revert "chore: add replDB to team service (#91799)" This reverts commitc6ae2d7999. * Revert "experiment: use read replica for Get and Find Dashboards (#91706)" This reverts commit54177ca619. * Revert "QuotaService: refactor to use ReplDB for Get queries (#91333)" This reverts commit299c142f6a. * Revert "refactor replCfg to look more like plugins/plugin config (#91142)" This reverts commitac0b4bb34d. * Revert "chore (replstore): fix registration with multiple sql drivers, again (#90990)" This reverts commitdaedb358dd. * Revert "Chore (sqlstore): add validation and testing for repl config (#90683)" This reverts commitaf19f039b6. * Revert "ReplStore: Add support for round robin load balancing between multiple read replicas (#90530)" This reverts commit27b52b1507. * Revert "DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235)" This reverts commit8a6107cd35. * Revert "accesscontrol service read replica (#89963)" This reverts commit77a4869fca. * Revert "Fix: add mapping for the new mysqlRepl driver (#89551)" This reverts commitab5a079bcc. * Revert "fix: sql instrumentation dual registration error (#89508)" This reverts commitd988f5c3b0. * Revert "Experimental Feature Toggle: databaseReadReplica (#89232)" This reverts commit50244ed4a1.
This commit is contained in:
@@ -23,15 +23,15 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
func TestIntegrationDashboardFolderStore(t *testing.T) {
|
||||
var sqlStore db.ReplDB
|
||||
var sqlStore db.DB
|
||||
var cfg *setting.Cfg
|
||||
var dashboardStore dashboards.Store
|
||||
|
||||
setup := func() {
|
||||
sqlStore, cfg = db.InitTestReplDBWithCfg(t)
|
||||
sqlStore, cfg = db.InitTestDBWithCfg(t)
|
||||
quotaService := quotatest.New(false, nil)
|
||||
var err error
|
||||
dashboardStore, err = database.ProvideDashboardStore(sqlStore, cfg, featuremgmt.WithFeatures(featuremgmt.FlagPanelTitleSearch), tagimpl.ProvideService(sqlStore.DB()), quotaService)
|
||||
dashboardStore, err = database.ProvideDashboardStore(sqlStore, cfg, featuremgmt.WithFeatures(featuremgmt.FlagPanelTitleSearch), tagimpl.ProvideService(sqlStore), quotaService)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
t.Run("Given dashboard and folder with the same title", func(t *testing.T) {
|
||||
|
||||
@@ -418,7 +418,7 @@ func TestIntegrationNestedFolderService(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
db, cfg := sqlstore.InitTestReplDB(t)
|
||||
db, cfg := sqlstore.InitTestDB(t)
|
||||
cfg.UnifiedAlerting.BaseInterval = time.Second
|
||||
quotaService := quotatest.New(false, nil)
|
||||
folderStore := ProvideDashboardFolderStore(db)
|
||||
@@ -828,7 +828,7 @@ func TestFolderServiceDualWrite(t *testing.T) {
|
||||
guardian.New = g
|
||||
})
|
||||
|
||||
db, _ := sqlstore.InitTestReplDB(t)
|
||||
db, _ := sqlstore.InitTestDB(t)
|
||||
cfg := setting.NewCfg()
|
||||
features := featuremgmt.WithFeatures()
|
||||
nestedFolderStore := ProvideStore(db)
|
||||
@@ -1459,7 +1459,7 @@ func TestIntegrationNestedFolderSharedWithMe(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
db, cfg := sqlstore.InitTestReplDB(t)
|
||||
db, cfg := sqlstore.InitTestDB(t)
|
||||
quotaService := quotatest.New(false, nil)
|
||||
folderStore := ProvideDashboardFolderStore(db)
|
||||
|
||||
@@ -1863,7 +1863,7 @@ func TestIntegrationNestedFolderSharedWithMe(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFolderServiceGetFolder(t *testing.T) {
|
||||
db, _ := sqlstore.InitTestReplDB(t)
|
||||
db, _ := sqlstore.InitTestDB(t)
|
||||
|
||||
signedInAdminUser := user.SignedInUser{UserID: 1, OrgID: orgID, Permissions: map[int64]map[string][]string{
|
||||
orgID: {
|
||||
@@ -1962,7 +1962,7 @@ func TestFolderServiceGetFolder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFolderServiceGetFolders(t *testing.T) {
|
||||
db, cfg := sqlstore.InitTestReplDB(t)
|
||||
db, cfg := sqlstore.InitTestDB(t)
|
||||
quotaService := quotatest.New(false, nil)
|
||||
folderStore := ProvideDashboardFolderStore(db)
|
||||
|
||||
@@ -2038,7 +2038,7 @@ func TestFolderServiceGetFolders(t *testing.T) {
|
||||
// TODO replace it with an API test under /pkg/tests/api/folders
|
||||
// whenever the golang client with get updated to allow filtering child folders by permission
|
||||
func TestGetChildrenFilterByPermission(t *testing.T) {
|
||||
db, cfg := sqlstore.InitTestReplDB(t)
|
||||
db, cfg := sqlstore.InitTestDB(t)
|
||||
|
||||
signedInAdminUser := user.SignedInUser{UserID: 1, OrgID: orgID, Permissions: map[int64]map[string][]string{
|
||||
orgID: {
|
||||
|
||||
Reference in New Issue
Block a user