Skip to content

Commit

Permalink
YDB: upgrade ydb-go-sdk + fix usage sugar.DSN (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov authored Nov 13, 2024
1 parent fe69b93 commit bb20e47
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/server/datasource/rdbms/ydb/connection_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (c *connectionManager) Make(
) (rdbms_utils.Connection, error) {
// TODO: add credentials (iam and basic) support
endpoint := common.EndpointToString(dsi.Endpoint)
dsn := sugar.DSN(endpoint, dsi.Database, dsi.UseTls)
dsn := sugar.DSN(endpoint, dsi.Database, sugar.WithSecure(dsi.UseTls))

var cred ydb_sdk.Option

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
github.com/stretchr/testify v1.8.4
github.com/wI2L/jsondiff v0.4.0
github.com/ydb-platform/ydb-go-genproto v0.0.0-20241022174402-dd276c7f197b
github.com/ydb-platform/ydb-go-sdk/v3 v3.89.0
github.com/ydb-platform/ydb-go-sdk/v3 v3.92.1
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.26.0
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,10 @@ github.com/wI2L/jsondiff v0.4.0/go.mod h1:nR/vyy1efuDeAtMwc3AF6nZf/2LD1ID8GTyyJ+
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g=
github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8=
github.com/ydb-platform/ydb-go-genproto v0.0.0-20240920120314-0fed943b0136 h1:MO32/Cba3XpNYWcoz3y13eHZG+RzDHmFPry3ren6BmE=
github.com/ydb-platform/ydb-go-genproto v0.0.0-20240920120314-0fed943b0136/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I=
github.com/ydb-platform/ydb-go-genproto v0.0.0-20241022174402-dd276c7f197b h1:8yiv/W+1xTdifJh1Stkck0gFJjys9kg0/r86Buljuss=
github.com/ydb-platform/ydb-go-genproto v0.0.0-20241022174402-dd276c7f197b/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I=
github.com/ydb-platform/ydb-go-sdk/v3 v3.84.1 h1:QkFhXiwoMRZTr7mxk77UeWXTCmkVXXESvncA/ug35S0=
github.com/ydb-platform/ydb-go-sdk/v3 v3.84.1/go.mod h1:BTLL5DJGTAe4sgr3sRum0OQVdNjG1cMjNwZN1qAq7eo=
github.com/ydb-platform/ydb-go-sdk/v3 v3.89.0 h1:UsYNRNGAWk/BnQ2QHjmuaLSbudLjdoq8bX7QBsamgHE=
github.com/ydb-platform/ydb-go-sdk/v3 v3.89.0/go.mod h1:ah+n4KaEcANFM+CBKnJ5VrmR0IvWfYFvkofW/56076c=
github.com/ydb-platform/ydb-go-sdk/v3 v3.92.1 h1:zD1Zap+dxV87FWpwSfNPgr4zv1X7iKFNwjqWZ26CSMA=
github.com/ydb-platform/ydb-go-sdk/v3 v3.92.1/go.mod h1:ah+n4KaEcANFM+CBKnJ5VrmR0IvWfYFvkofW/56076c=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
2 changes: 1 addition & 1 deletion tools/ydb/big_insert/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func makeRandomString(n int, start int) string {
}

func makeConnection(ctx context.Context, endpoint string, database string, useTLS bool, token string) (*sql.DB, error) {
dsn := sugar.DSN(endpoint, database, useTLS)
dsn := sugar.DSN(endpoint, database, sugar.WithSecure(useTLS))

log.Println("connecting to database", dsn)

Expand Down
2 changes: 1 addition & 1 deletion tools/ydb/query_service_negative/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func makeDriver(ctx context.Context, endpoint, login, password string) (*ydb.Dri
ydb.With(config.WithGrpcOptions(grpc.WithDisableServiceConfig())),
}

dsn := sugar.DSN(endpoint, dbName, false)
dsn := sugar.DSN(endpoint, dbName)

ydbDriver, err := ydb.Open(ctx, dsn, ydbOptions...)
if err != nil {
Expand Down

0 comments on commit bb20e47

Please sign in to comment.