Skip to content

bump gorm.io dependencies and fix conflicts #767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 10 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ toolchain go1.22.2
require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/clusterpedia-io/api v0.0.0
github.com/go-sql-driver/mysql v1.6.0
github.com/go-sql-driver/mysql v1.9.0
github.com/gorilla/mux v1.8.0
github.com/jackc/pgconn v1.13.0
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
github.com/jackc/pgx/v4 v4.17.2
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
github.com/jackc/pgx/v5 v5.5.5
github.com/jinzhu/configor v1.2.2
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/common v0.55.0
Expand All @@ -23,11 +22,11 @@ require (
go.opentelemetry.io/otel/trace v1.28.0
go.uber.org/atomic v1.11.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gorm.io/datatypes v1.0.7
gorm.io/driver/mysql v1.4.4
gorm.io/driver/postgres v1.4.5
gorm.io/datatypes v1.2.5
gorm.io/driver/mysql v1.5.7
gorm.io/driver/postgres v1.5.11
gorm.io/driver/sqlite v1.4.4
gorm.io/gorm v1.24.1
gorm.io/gorm v1.25.12
k8s.io/api v0.31.2
k8s.io/apiextensions-apiserver v0.31.2
k8s.io/apimachinery v0.31.2
Expand All @@ -46,6 +45,7 @@ require (
)

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
Expand Down Expand Up @@ -91,12 +91,9 @@ require (
github.com/huandu/xstrings v1.3.1 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.12.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down
211 changes: 28 additions & 183 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/storage/internalstorage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/go-sql-driver/mysql"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
"gopkg.in/natefinch/lumberjack.v2"
"gorm.io/gorm/logger"
"k8s.io/klog/v2"
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/internalstorage/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"syscall"

"github.com/go-sql-driver/mysql"
"github.com/jackc/pgconn"
"github.com/jackc/pgerrcode"
"github.com/jackc/pgx/v5/pgconn"
"gorm.io/gorm"
genericstorage "k8s.io/apiserver/pkg/storage"

Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/internalstorage/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"

"github.com/go-sql-driver/mysql"
"github.com/jackc/pgx/v4/stdlib"
"github.com/jackc/pgx/v5/stdlib"
"github.com/jinzhu/configor"
"gopkg.in/natefinch/lumberjack.v2"
gmysql "gorm.io/driver/mysql"
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/internalstorage/resource_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ func TestApplyListOptionsToResourceQuery_Owner(t *testing.T) {
OwnerGroupResource: schema.GroupResource{Group: "apps", Resource: "deployments"},
},
expected{
`SELECT * FROM "resources" WHERE cluster = 'cluster-1' AND owner_uid IN (SELECT "uid" FROM "resources" WHERE "cluster" = 'cluster-1' AND "group" = 'apps' AND "resource" = 'deployments' AND name = 'owner-name-1')`,
"SELECT * FROM `resources` WHERE cluster = 'cluster-1' AND owner_uid IN (SELECT `uid` FROM `resources` WHERE `cluster` = 'cluster-1' AND `group` = 'apps' AND `resource` = 'deployments' AND name = 'owner-name-1')",
`SELECT * FROM "resources" WHERE cluster = 'cluster-1' AND owner_uid IN (SELECT "uid" FROM "resources" WHERE "cluster" = 'cluster-1' AND ("group" = 'apps' AND "resource" = 'deployments') AND name = 'owner-name-1')`,
"SELECT * FROM `resources` WHERE cluster = 'cluster-1' AND owner_uid IN (SELECT `uid` FROM `resources` WHERE `cluster` = 'cluster-1' AND (`group` = 'apps' AND `resource` = 'deployments') AND name = 'owner-name-1')",
"",
},
},
Expand Down
12 changes: 6 additions & 6 deletions pkg/storage/internalstorage/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,12 +1134,12 @@ func TestApplyListOptionsURLQueryParameterizedQueryToWhereClause(t *testing.T) {
},

testSQLQueriesAssertionTestCase: testSQLQueriesAssertionTestCase{
postgresRawQuery: "SELECT * FROM \"resources\" WHERE test_column = ' OR (\\'1\\' = \\'1'",
postgresRawQuery: "SELECT * FROM \"resources\" WHERE test_column = ' OR (''1'' = ''1'",
postgresUnexplainedRawQuery: "SELECT * FROM \"resources\" WHERE test_column = $1",
postgresSqlmockDBExecutedQuery: "SELECT \\* FROM \"resources\" WHERE test_column = \\$1",
postgresSqlmockDBExecutedArgs: []driver.Value{" OR ('1' = '1"},

mysqlRawQuery: "SELECT * FROM `resources` WHERE test_column = ' OR (\\'1\\' = \\'1'",
mysqlRawQuery: "SELECT * FROM `resources` WHERE test_column = ' OR (''1'' = ''1'",
mysqlUnexplainedRawQuery: "SELECT * FROM `resources` WHERE test_column = ?",
mysqlSqlmockDBExecutedQuery: "SELECT \\* FROM `resources` WHERE test_column = \\?",
mysqlSqlmockDBExecutedArgs: []driver.Value{" OR ('1' = '1"},
Expand All @@ -1160,7 +1160,7 @@ func TestApplyListOptionsURLQueryParameterizedQueryToWhereClause(t *testing.T) {
},

testSQLQueriesAssertionTestCase: testSQLQueriesAssertionTestCase{
postgresRawQuery: "SELECT * FROM \"resources\" WHERE test_column = ' OR (\\'1\\' = \\'1\\'); --' AND test_column2 = true",
postgresRawQuery: "SELECT * FROM \"resources\" WHERE test_column = ' OR (''1'' = ''1''); --' AND test_column2 = true",
postgresUnexplainedRawQuery: "SELECT * FROM \"resources\" WHERE test_column = $1 AND test_column2 = true",
postgresSqlmockDBExecutedQuery: "SELECT \\* FROM \"resources\" WHERE test_column = \\$1",
postgresSqlmockDBExecutedArgs: []driver.Value{" OR ('1' = '1'); --"},
Expand All @@ -1184,7 +1184,7 @@ func TestApplyListOptionsURLQueryParameterizedQueryToWhereClause(t *testing.T) {
testSQLQueriesAssertionTestCase: testSQLQueriesAssertionTestCase{
ignorePostgres: true,

mysqlRawQuery: "SELECT * FROM `resources` WHERE test_column = ' OR (\\'1\\' = \\'1\\'); #' AND test_column2 = true",
mysqlRawQuery: "SELECT * FROM `resources` WHERE test_column = ' OR (''1'' = ''1''); #' AND test_column2 = true",
mysqlUnexplainedRawQuery: "SELECT * FROM `resources` WHERE test_column = ? AND test_column2 = true",
mysqlSqlmockDBExecutedQuery: "SELECT \\* FROM `resources` WHERE test_column = \\? AND test_column2 = true",
mysqlSqlmockDBExecutedArgs: []driver.Value{" OR ('1' = '1'); #"},
Expand Down Expand Up @@ -1242,12 +1242,12 @@ func TestApplyListOptionsURLQueryParameterizedQueryToWhereClause(t *testing.T) {
},

testSQLQueriesAssertionTestCase: testSQLQueriesAssertionTestCase{
postgresRawQuery: "SELECT * FROM \"resources\" WHERE test_column = ' UNION SELECT \\'a\\',NULL,NULL;--'",
postgresRawQuery: "SELECT * FROM \"resources\" WHERE test_column = ' UNION SELECT ''a'',NULL,NULL;--'",
postgresUnexplainedRawQuery: "SELECT * FROM \"resources\" WHERE test_column = $1",
postgresSqlmockDBExecutedQuery: "SELECT \\* FROM \"resources\" WHERE test_column = \\$1",
postgresSqlmockDBExecutedArgs: []driver.Value{" UNION SELECT 'a',NULL,NULL;--"},

mysqlRawQuery: "SELECT * FROM `resources` WHERE test_column = ' UNION SELECT \\'a\\',NULL,NULL;--'",
mysqlRawQuery: "SELECT * FROM `resources` WHERE test_column = ' UNION SELECT ''a'',NULL,NULL;--'",
mysqlUnexplainedRawQuery: "SELECT * FROM `resources` WHERE test_column = ?",
mysqlSqlmockDBExecutedQuery: "SELECT \\* FROM `resources` WHERE test_column = \\?",
mysqlSqlmockDBExecutedArgs: []driver.Value{" UNION SELECT 'a',NULL,NULL;--"},
Expand Down
27 changes: 27 additions & 0 deletions vendor/filippo.io/edwards25519/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions vendor/filippo.io/edwards25519/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions vendor/filippo.io/edwards25519/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading