Chore: Replace xorm.io/xorm imports (#104458)

* replace xorm.io/xorm imports

* replace xorm from other go.mod files

* clean up workspace

* nolint does not make sense anymore as it is not a module

* try if nolint directive helps

* use nolint:all for xorm

* add more nolints

* try to skip xorm in linter config

* exclude xorm differently

* retrigger ci
pull/102948/merge
Serge Zaitsev 2 months ago committed by GitHub
parent 847b07dee2
commit 694b9dfe50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      .golangci.yml
  2. 5
      go.mod
  3. 5
      go.sum
  4. 5
      go.work
  5. 3
      pkg/build/go.mod
  6. 2
      pkg/infra/db/db.go
  7. 2
      pkg/infra/db/dbtest/dbtest.go
  8. 2
      pkg/services/apikey/apikeyimpl/xorm_store.go
  9. 2
      pkg/services/authz/zanzana/store/migration/migrator.go
  10. 2
      pkg/services/dashboards/database/migrations/folder_uid_mig.go
  11. 2
      pkg/services/datasources/service/store.go
  12. 2
      pkg/services/ngalert/store/alert_rule.go
  13. 2
      pkg/services/sqlstore/migrations/accesscontrol/action_migrator.go
  14. 2
      pkg/services/sqlstore/migrations/accesscontrol/action_set_migration.go
  15. 2
      pkg/services/sqlstore/migrations/accesscontrol/admin_only.go
  16. 2
      pkg/services/sqlstore/migrations/accesscontrol/alerting.go
  17. 2
      pkg/services/sqlstore/migrations/accesscontrol/dashboard_permissions.go
  18. 2
      pkg/services/sqlstore/migrations/accesscontrol/datasource_drilldown_removal.go
  19. 2
      pkg/services/sqlstore/migrations/accesscontrol/disabled_migration.go
  20. 2
      pkg/services/sqlstore/migrations/accesscontrol/managed_permission_migrator.go
  21. 2
      pkg/services/sqlstore/migrations/accesscontrol/orphaned.go
  22. 2
      pkg/services/sqlstore/migrations/accesscontrol/permission_migrator.go
  23. 2
      pkg/services/sqlstore/migrations/accesscontrol/scope_migrator.go
  24. 2
      pkg/services/sqlstore/migrations/accesscontrol/seed_assignment.go
  25. 2
      pkg/services/sqlstore/migrations/accesscontrol/team_membership.go
  26. 2
      pkg/services/sqlstore/migrations/accesscontrol/test/ac_test.go
  27. 2
      pkg/services/sqlstore/migrations/accesscontrol/test/managed_permission_migrator_test.go
  28. 2
      pkg/services/sqlstore/migrations/annotation_mig.go
  29. 2
      pkg/services/sqlstore/migrations/dashboard_mig.go
  30. 2
      pkg/services/sqlstore/migrations/external_alertmanagers.go
  31. 2
      pkg/services/sqlstore/migrations/migrations_test.go
  32. 2
      pkg/services/sqlstore/migrations/star_mig.go
  33. 2
      pkg/services/sqlstore/migrations/temp_user.go
  34. 2
      pkg/services/sqlstore/migrations/ualert/alert_rule_version_guid_mig.go
  35. 2
      pkg/services/sqlstore/migrations/ualert/created_folders_mig.go
  36. 2
      pkg/services/sqlstore/migrations/ualert/migration_service_migration.go
  37. 2
      pkg/services/sqlstore/migrations/ualert/org_upgrade_state_mig.go
  38. 2
      pkg/services/sqlstore/migrations/ualert/receiver_scope_mig.go
  39. 2
      pkg/services/sqlstore/migrations/ualert/rule_group_index_migration.go
  40. 2
      pkg/services/sqlstore/migrations/ualert/tables.go
  41. 2
      pkg/services/sqlstore/migrations/ualert/test/testing.go
  42. 2
      pkg/services/sqlstore/migrations/ualert/ualert.go
  43. 2
      pkg/services/sqlstore/migrations/user_mig.go
  44. 2
      pkg/services/sqlstore/migrations/usermig/service_account_multiple_org_login_migrator.go
  45. 2
      pkg/services/sqlstore/migrations/usermig/test/user_test.go
  46. 2
      pkg/services/sqlstore/migrations/usermig/user_lowercase_login_and_email.go
  47. 2
      pkg/services/sqlstore/migrator/dialect.go
  48. 2
      pkg/services/sqlstore/migrator/migrator.go
  49. 2
      pkg/services/sqlstore/migrator/mysql_dialect.go
  50. 2
      pkg/services/sqlstore/migrator/postgres_dialect.go
  51. 2
      pkg/services/sqlstore/migrator/spanner_dialect.go
  52. 2
      pkg/services/sqlstore/migrator/sqlite_dialect.go
  53. 2
      pkg/services/sqlstore/migrator/types.go
  54. 2
      pkg/services/sqlstore/session.go
  55. 2
      pkg/services/sqlstore/sqlstore.go
  56. 2
      pkg/services/sqlstore/sqlstore_testinfra.go
  57. 2
      pkg/services/sqlstore/sqlstore_testinfra_test.go
  58. 2
      pkg/services/sqlstore/transactions.go
  59. 2
      pkg/storage/unified/sql/db/dbimpl/db_engine.go
  60. 2
      pkg/storage/unified/sql/db/dbimpl/dbimpl.go
  61. 2
      pkg/storage/unified/sql/db/migrations/deletion_markers.go
  62. 2
      pkg/storage/unified/sql/db/migrations/migrator.go
  63. 0
      pkg/util/xorm/.nolint
  64. 64
      pkg/util/xorm/go.mod
  65. 1641
      pkg/util/xorm/go.sum

@ -293,6 +293,7 @@ linters:
- third_party$
- builtin$
- examples$
- pkg/util/xorm
issues:
max-same-issues: 0
formatters:

@ -203,7 +203,6 @@ require (
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // @grafana/partner-datasources
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // @grafana-app-platform-squad
xorm.io/builder v0.3.6 // @grafana/grafana-backend-group
xorm.io/xorm v0.8.2 // @grafana/alerting-backend
)
require (
@ -572,7 +571,6 @@ require (
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
xorm.io/core v0.7.3 // indirect
)
// Use fork of crewjam/saml with fixes for some issues until changes get merged into upstream
@ -584,9 +582,6 @@ replace github.com/prometheus/alertmanager => github.com/grafana/prometheus-aler
exclude github.com/mattn/go-sqlite3 v2.0.3+incompatible
// Use our fork xorm. go.work currently overrides this and points to the local ./pkg/util/xorm directory.
replace xorm.io/xorm => github.com/grafana/grafana/pkg/util/xorm v0.0.1
// lock for mysql tsdb compat
replace github.com/go-sql-driver/mysql => github.com/go-sql-driver/mysql v1.7.1

@ -1628,8 +1628,6 @@ github.com/grafana/grafana/pkg/storage/unified/apistore v0.0.0-20250422074709-7c
github.com/grafana/grafana/pkg/storage/unified/apistore v0.0.0-20250422074709-7c8433fbb2c2/go.mod h1:LivE9S7HU1uU0cZ99wG77ZgPmOPZYuFWfZ68Lh59gPU=
github.com/grafana/grafana/pkg/storage/unified/resource v0.0.0-20250422074709-7c8433fbb2c2 h1:1f8d/Jy/9kv4bqtI5dQjxhpzFBWFrmtPXAPjOd8e6WA=
github.com/grafana/grafana/pkg/storage/unified/resource v0.0.0-20250422074709-7c8433fbb2c2/go.mod h1:c1wMG6p6/zlMsi1KoOGYNMdFW2f8xM690CSZcl2i4eI=
github.com/grafana/grafana/pkg/util/xorm v0.0.1 h1:72QZjxWIWpSeOF8ob4aMV058kfgZyeetkAB8dmeti2o=
github.com/grafana/grafana/pkg/util/xorm v0.0.1/go.mod h1:eNfbB9f2jM8o9RfwqwjY8SYm5tvowJ8Ly+iE4P9rXII=
github.com/grafana/jsonparser v0.0.0-20240425183733-ea80629e1a32 h1:NznuPwItog+rwdVg8hAuGKP29ndRSzJAwhxKldkP8oQ=
github.com/grafana/jsonparser v0.0.0-20240425183733-ea80629e1a32/go.mod h1:796sq+UcONnSlzA3RtlBZ+b/hrerkZXiEmO8oMjyRwY=
github.com/grafana/loki/pkg/push v0.0.0-20231124142027-e52380921608 h1:ZYk42718kSXOiIKdjZKljWLgBpzL5z1yutKABksQCMg=
@ -3192,7 +3190,6 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
@ -3595,5 +3592,3 @@ sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
xorm.io/builder v0.3.6 h1:ha28mQ2M+TFx96Hxo+iq6tQgnkC9IZkM6D8w9sKHHF8=
xorm.io/builder v0.3.6/go.mod h1:LEFAPISnRzG+zxaxj2vPicRwz67BdhFreKg8yv8/TgU=
xorm.io/core v0.7.3 h1:W8ws1PlrnkS1CZU1YWaYLMQcQilwAmQXU0BJDJon+H0=
xorm.io/core v0.7.3/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM=

@ -30,13 +30,8 @@ use (
./pkg/semconv
./pkg/storage/unified/apistore
./pkg/storage/unified/resource
./pkg/util/xorm // skip:golangci-lint
)
// when we release xorm we would like to release it like github.com/grafana/grafana/pkg/util/xorm
// but we don't want to change all the imports. so we use replace to handle this situation
replace xorm.io/xorm => ./pkg/util/xorm
replace github.com/getkin/kin-openapi => github.com/getkin/kin-openapi v0.126.0
replace github.com/prometheus/alertmanager => github.com/grafana/prometheus-alertmanager v0.25.1-0.20250331083058-4563aec7a975

@ -133,6 +133,3 @@ replace github.com/crewjam/saml => github.com/grafana/saml v0.4.15-0.20240523142
replace github.com/prometheus/alertmanager => github.com/grafana/prometheus-alertmanager v0.25.1-0.20240625192351-66ec17e3aa45
exclude github.com/mattn/go-sqlite3 v2.0.3+incompatible
// Use our fork xorm. go.work currently overrides this and points to the local ./pkg/util/xorm directory.
replace xorm.io/xorm => github.com/grafana/grafana/pkg/util/xorm v0.0.1

@ -6,7 +6,7 @@ import (
"github.com/grafana/grafana/pkg/util/xorm/core"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -3,8 +3,8 @@ package dbtest
import (
"context"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/util/xorm/core"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/services/accesscontrol"

@ -6,7 +6,7 @@ import (
"fmt"
"strings"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/setting"

@ -2,7 +2,7 @@ package migrations
import (
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
type DummyMigration struct {

@ -7,7 +7,7 @@ import (
"strings"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/events"

@ -11,7 +11,7 @@ import (
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/infra/db"

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -5,7 +5,7 @@ import (
"strings"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -3,7 +3,7 @@ package accesscontrol
import (
"strings"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -4,7 +4,7 @@ import (
"fmt"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -6,7 +6,7 @@ import (
"strings"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
ac "github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/dashboards"

@ -3,7 +3,7 @@ package accesscontrol
import (
"fmt"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -3,7 +3,7 @@ package accesscontrol
import (
"fmt"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -12,9 +12,9 @@ import (
"strings"
"time"
"github.com/grafana/grafana/pkg/util/xorm"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/accesscontrol"

@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -6,7 +6,7 @@ import (
"strings"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -1,7 +1,7 @@
package accesscontrol
import (
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -1,7 +1,7 @@
package accesscontrol
import (
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -5,7 +5,7 @@ import (
"strconv"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/org"

@ -10,9 +10,9 @@ import (
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/stretchr/testify/require"
"gopkg.in/ini.v1"
"xorm.io/xorm"
)
type rawPermission struct {

@ -5,8 +5,8 @@ import (
"strings"
"testing"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/stretchr/testify/require"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/accesscontrol"

@ -1,7 +1,7 @@
package migrations
import (
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -3,7 +3,7 @@ package migrations
import (
"fmt"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -6,7 +6,7 @@ import (
"os"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/infra/log"

@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
"gopkg.in/ini.v1"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"

@ -4,7 +4,7 @@ import (
"fmt"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
// does not rely on dashboard table existing, can be run before dashboard migrations

@ -3,7 +3,7 @@ package migrations
import (
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -10,7 +10,7 @@ import (
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/util"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
// AddAlertRuleGuidMigration sets up migrations for adding and managing GUID columns in alert_rule and alert_rule_version tables.

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -5,7 +5,7 @@ import (
"strconv"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -4,7 +4,7 @@ import (
"fmt"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -1,7 +1,7 @@
package ualert
import (
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -3,7 +3,7 @@ package ualert
import (
"fmt"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)

@ -3,9 +3,9 @@ package test
import (
"testing"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/stretchr/testify/require"
"gopkg.in/ini.v1"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"

@ -6,7 +6,7 @@ import (
"path/filepath"
"strconv"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -3,7 +3,7 @@ package migrations
import (
"fmt"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations/usermig"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"

@ -4,7 +4,7 @@ import (
"fmt"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
const (

@ -4,9 +4,9 @@ import (
"testing"
"time"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/stretchr/testify/require"
"gopkg.in/ini.v1"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"

@ -5,7 +5,7 @@ import (
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/user"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
const (

@ -9,7 +9,7 @@ import (
"golang.org/x/exp/slices"
"github.com/grafana/grafana/pkg/services/sqlstore/session"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
var (

@ -18,7 +18,7 @@ import (
"go.opentelemetry.io/otel/trace"
"go.uber.org/atomic"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/metrics/metricutil"

@ -10,7 +10,7 @@ import (
"github.com/VividCortex/mysqlerr"
"github.com/go-sql-driver/mysql"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
type MySQLDialect struct {

@ -9,7 +9,7 @@ import (
"github.com/lib/pq"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
type PostgresDialect struct {

@ -16,8 +16,8 @@ import (
"cloud.google.com/go/spanner/admin/database/apiv1/databasepb"
"github.com/googleapis/gax-go/v2"
spannerdriver "github.com/googleapis/go-sql-spanner"
"github.com/grafana/grafana/pkg/util/xorm"
"google.golang.org/grpc/codes"
"xorm.io/xorm"
"github.com/grafana/dskit/concurrency"
utilspanner "github.com/grafana/grafana/pkg/util/spanner"

@ -7,7 +7,7 @@ import (
"github.com/mattn/go-sqlite3"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
type SQLite3 struct {

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
const (

@ -10,8 +10,8 @@ import (
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/noop"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/util/xorm/core"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/apimachinery/errutil"
"github.com/grafana/grafana/pkg/infra/log"

@ -16,8 +16,8 @@ import (
_ "github.com/lib/pq"
"github.com/prometheus/client_golang/prometheus"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/util/xorm/core"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/infra/fs"

@ -27,7 +27,7 @@ import (
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"
"github.com/grafana/grafana/pkg/setting"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
// TestingTB is an interface that is implemented by *testing.T and *testing.B. Similar to testing.TB.

@ -12,7 +12,7 @@ import (
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
)
// Ensure that we can get any connection at all.

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/infra/log"

@ -9,7 +9,7 @@ import (
"github.com/go-sql-driver/mysql"
"github.com/grafana/dskit/crypto/tls"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"

@ -7,10 +7,10 @@ import (
"sync"
"github.com/dlmiddlecote/sqlstats"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/prometheus/client_golang/prometheus"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/noop"
"xorm.io/xorm"
infraDB "github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/infra/log"

@ -3,9 +3,9 @@ package migrations
import (
"fmt"
"github.com/grafana/grafana/pkg/util/xorm"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"xorm.io/builder"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/apimachinery/utils"
"github.com/grafana/grafana/pkg/infra/log"

@ -3,7 +3,7 @@ package migrations
import (
"context"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/util/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/setting"

@ -1,64 +0,0 @@
module github.com/grafana/grafana/pkg/util/xorm
go 1.24.2
require (
cloud.google.com/go/spanner v1.75.0
github.com/googleapis/go-sql-spanner v1.11.1
github.com/mattn/go-sqlite3 v1.14.22
github.com/stretchr/testify v1.10.0
google.golang.org/grpc v1.71.1
xorm.io/builder v0.3.6
)
require (
cel.dev/expr v0.19.1 // indirect
cloud.google.com/go v0.118.2 // indirect
cloud.google.com/go/auth v0.15.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
cloud.google.com/go/iam v1.3.1 // indirect
cloud.google.com/go/longrunning v0.6.4 // indirect
cloud.google.com/go/monitoring v1.23.0 // indirect
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.2 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/oauth2 v0.29.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.24.0 // indirect
golang.org/x/time v0.11.0 // indirect
google.golang.org/api v0.223.0 // indirect
google.golang.org/genproto v0.0.0-20250122153221-138b5a5a4fd4 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save