Remove support for Google Spanner database. (#105846)

* Remove support for Google Spanner database.
This commit is contained in:
Peter Štibraný
2025-05-23 11:35:59 +02:00
committed by GitHub
parent 9769871a88
commit c4d3eb1cd0
50 changed files with 26 additions and 1265 deletions
+1 -5
View File
@@ -8,8 +8,6 @@ import (
"github.com/mattn/go-sqlite3"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/codes"
grpcstatus "google.golang.org/grpc/status"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)
@@ -141,12 +139,10 @@ func getRetryErrors(t *testing.T, store *SQLStore) []error {
switch store.GetDialect().DriverName() {
case migrator.SQLite:
retryErrors = []error{sqlite3.Error{Code: sqlite3.ErrBusy}, sqlite3.Error{Code: sqlite3.ErrLocked}}
case migrator.Spanner:
retryErrors = []error{grpcstatus.Error(codes.Aborted, "aborted transaction")}
}
if len(retryErrors) == 0 {
t.Skip("This test only works with sqlite or spanner")
t.Skip("This test only works with sqlite")
}
return retryErrors
}