Skip to content

Commit 5d74b11

Browse files
authored
Merge branch 'master' into topic-split-merge
2 parents a68879e + 68da27d commit 5d74b11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+3226
-1280
lines changed

.github/workflows/examples.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
workflow_dispatch:
99
jobs:
1010
basic-ydb:
11+
if: (!contains(github.event.pull_request.labels.*.name, 'no examples'))
1112
concurrency:
1213
group: basic-ydb-${{ github.ref }}-${{ matrix.ydb-version }}-${{ matrix.application }}
1314
cancel-in-progress: true
@@ -48,6 +49,7 @@ jobs:
4849
working-directory: ./examples/basic/${{ matrix.application }}
4950
run: go run .
5051
basic-ydb-database-sql:
52+
if: (!contains(github.event.pull_request.labels.*.name, 'no examples'))
5153
concurrency:
5254
group: basic-ydb-${{ github.ref }}-${{ matrix.ydb-version }}-${{ matrix.application }}-${{ matrix.query_service }}
5355
cancel-in-progress: true
@@ -90,6 +92,7 @@ jobs:
9092
working-directory: ./examples/basic/${{ matrix.application }}
9193
run: go run .
9294
basic-postgres:
95+
if: (!contains(github.event.pull_request.labels.*.name, 'no examples'))
9396
concurrency:
9497
group: basic-postgres-${{ matrix.application }}-${{ github.ref }}
9598
cancel-in-progress: true
@@ -126,6 +129,7 @@ jobs:
126129
working-directory: ./examples/basic/${{ matrix.application }}
127130
run: go run .
128131
basic-sqlite:
132+
if: (!contains(github.event.pull_request.labels.*.name, 'no examples'))
129133
concurrency:
130134
group: basic-sqlite-${{ matrix.application }}-${{ github.ref }}
131135
cancel-in-progress: true

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010
GOLANGCI_LINT_VERSION: v1.60.3
1111
jobs:
1212
golangci:
13+
if: (!contains(github.event.pull_request.labels.*.name, 'no lint'))
1314
name: golangci-lint
1415
concurrency:
1516
group: lint-golangci-${{ github.ref }}
@@ -39,6 +40,7 @@ jobs:
3940
args: --timeout=5m
4041
working-directory: examples
4142
golangci-slo:
43+
if: (!contains(github.event.pull_request.labels.*.name, 'no lint'))
4244
name: golangci-lint-slo
4345
concurrency:
4446
group: lint-golangci-slo-${{ github.ref }}
@@ -55,6 +57,7 @@ jobs:
5557
args: --timeout=5m
5658
working-directory: tests/slo
5759
autoformatter:
60+
if: (!contains(github.event.pull_request.labels.*.name, 'no lint'))
5861
name: autoformat check
5962
concurrency:
6063
group: lint-autoformat-${{ github.ref }}

.github/workflows/slo-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
if: github.event.workflow_run.conclusion == 'success'
1717
steps:
1818
- name: Publish YDB SLO Report
19-
uses: ydb-platform/ydb-slo-action/report@main
19+
uses: ydb-platform/ydb-slo-action/report@charts
2020
with:
2121
token: ${{ secrets.GITHUB_TOKEN }}
2222
run_id: ${{ github.event.workflow_run.id }}

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
fail-fast: false
5454
matrix:
5555
go-version: [1.21.x, 1.24.x]
56-
ydb-version: [24.1, 24.2, 24.3]
56+
ydb-version: [24.1, 24.2, 24.3, 24.4, 25.1]
5757
os: [ubuntu]
5858
services:
5959
ydb:

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
11
* Supported topic split merge server feature for topic reader (no api changed)
2+
3+
## v3.104.7
4+
* Added public type alias `ydb.Params` to `internal/params.Parameters` for external usage
5+
6+
## v3.104.6
7+
* Refactored `table.TransactionControl` and `query.TransactionControl` for use single implementation in `internal/tx`
8+
* Changed `ydb.WithTxControl` context modifier for allow both `table.TransactionControl` and `query.TransactionControl`
9+
10+
## v3.104.5
11+
* Added query client session pool metrics: create_in_progress, in_use, waiters_queue
12+
* Added pool item closing for not-alived item
13+
14+
## v3.104.4
15+
* Fixed bug with session query latency metric collector
16+
17+
## v3.104.3
18+
* Changed argument types in `table.Client.ReadRows` to public types for compatibility with mock-generation
19+
20+
## v3.104.2
21+
* Added bindings options into `ydb.ParamsFromMap` for bind wide time types
22+
* Changed `ydb.WithWideTimeTypes(bool)` for allow boolean argument
23+
24+
## v3.104.1
25+
* Added export of advanced metric information for QueryService calls
26+
27+
## v3.104.0
28+
* Added binding `ydb.WithWideTimeTypes()` which interprets `time.Time` and `time.Duration` as `Timestamp64` and `Interval64` YDB types
29+
30+
## v3.103.0
31+
* Supported wide `Interval64` type
32+
33+
## v3.102.0
34+
* Supported wide `Date32`, `Datetime64` and `Timestamp64` types
35+
36+
## v3.101.4
37+
* Switched internal type of result `ydb.Driver.Query()` from `*internal/query.Client` to `query.Client` interface
38+
39+
## v3.101.3
40+
* Added `query.TransactionActor` type alias to `query.TxActor` for compatibility with `table.Client` API's
41+
* Removed comment `experimental` from `ydb.ParamsBuilder` and `ydb.ParamsFromMap`
42+
* Fixed panic on closing `internal/query/sessionCore.done` channel twice
243
* Fixed hangup when try to send batch of messages with size more, then grpc limits from topic writer internals
344

445
## v3.101.2

driver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import (
4242
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xsync"
4343
"github.com/ydb-platform/ydb-go-sdk/v3/log"
4444
"github.com/ydb-platform/ydb-go-sdk/v3/operation"
45+
"github.com/ydb-platform/ydb-go-sdk/v3/query"
4546
"github.com/ydb-platform/ydb-go-sdk/v3/ratelimiter"
4647
"github.com/ydb-platform/ydb-go-sdk/v3/scheme"
4748
"github.com/ydb-platform/ydb-go-sdk/v3/scripting"
@@ -228,7 +229,7 @@ func (d *Driver) Table() table.Client {
228229
}
229230

230231
// Query returns query client
231-
func (d *Driver) Query() *internalQuery.Client {
232+
func (d *Driver) Query() query.Client {
232233
return d.query.Must()
233234
}
234235

dsn.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ func parseConnectionString(dataSourceName string) (opts []Option, _ error) {
114114
binders = append(binders, xsql.WithQueryBind(bind.PositionalArgs{}))
115115
case "numeric":
116116
binders = append(binders, xsql.WithQueryBind(bind.NumericArgs{}))
117+
case "wide_time_types":
118+
binders = append(binders, xsql.WithQueryBind(bind.WideTimeTypes(true)))
117119
default:
118120
if strings.HasPrefix(transformer, tablePathPrefixTransformer) {
119121
prefix, err := extractTablePathPrefixFromBinderName(transformer)

dsn_test.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestParse(t *testing.T) {
3030
return xtable.New(context.Background(), nil, nil, opts...)
3131
}
3232
newQueryConn := func(opts ...xquery.Option) *xquery.Conn {
33-
return xquery.New(context.Background(), nil, nil, opts...)
33+
return xquery.New(context.Background(), nil, opts...)
3434
}
3535
compareConfigs := func(t *testing.T, lhs, rhs *config.Config) {
3636
require.Equal(t, lhs.Secure(), rhs.Secure())
@@ -171,6 +171,21 @@ func TestParse(t *testing.T) {
171171
},
172172
err: nil,
173173
},
174+
{
175+
dsn: "grpc://localhost:2135/local?query_mode=scripting&go_query_bind=positional,declare,wide_time_types", //nolint:lll
176+
opts: []config.Option{
177+
config.WithSecure(false),
178+
config.WithEndpoint("localhost:2135"),
179+
config.WithDatabase("/local"),
180+
},
181+
connectorOpts: []xsql.Option{
182+
xsql.WithDefaultQueryMode(xtable.ScriptingQueryMode),
183+
xsql.WithQueryBind(bind.PositionalArgs{}),
184+
xsql.WithQueryBind(bind.AutoDeclare{}),
185+
xsql.WithQueryBind(bind.WideTimeTypes(true)),
186+
},
187+
err: nil,
188+
},
174189
} {
175190
t.Run("", func(t *testing.T) {
176191
opts, err := parseConnectionString(tt.dsn)

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/google/uuid v1.6.0
88
github.com/jonboulle/clockwork v0.3.0
99
github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77
10+
go.uber.org/goleak v1.3.0
1011
golang.org/x/net v0.33.0
1112
golang.org/x/sync v0.10.0
1213
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
@@ -17,18 +18,19 @@ require (
1718
// requires for tests only
1819
require (
1920
github.com/rekby/fixenv v0.6.1
20-
github.com/stretchr/testify v1.7.1
21+
github.com/stretchr/testify v1.8.0
2122
go.uber.org/mock v0.4.0
2223
)
2324

2425
require (
25-
github.com/davecgh/go-spew v1.1.0 // indirect
26+
github.com/davecgh/go-spew v1.1.1 // indirect
2627
github.com/golang/protobuf v1.5.3 // indirect
28+
github.com/kr/text v0.2.0 // indirect
2729
github.com/pmezard/go-difflib v1.0.0 // indirect
2830
golang.org/x/sys v0.28.0 // indirect
2931
golang.org/x/text v0.21.0 // indirect
3032
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
31-
gopkg.in/yaml.v3 v3.0.0 // indirect
33+
gopkg.in/yaml.v3 v3.0.1 // indirect
3234
)
3335

3436
retract v3.67.1 // decimal broken https://github.com/ydb-platform/ydb-go-sdk/issues/1234

go.sum

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP
1111
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
1212
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
1313
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
14-
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
14+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
1515
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
16+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
17+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1618
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
1719
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
1820
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -54,20 +56,28 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
5456
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
5557
github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg=
5658
github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
59+
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
60+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
61+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
62+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
5763
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5864
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5965
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
6066
github.com/rekby/fixenv v0.6.1 h1:jUFiSPpajT4WY2cYuc++7Y1zWrnCxnovGCIX72PZniM=
6167
github.com/rekby/fixenv v0.6.1/go.mod h1:/b5LRc06BYJtslRtHKxsPWFT/ySpHV+rWvzTg+XWk4c=
6268
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
6369
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
70+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
6471
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
6572
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
66-
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
6773
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
74+
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
75+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
6876
github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 h1:LY6cI8cP4B9rrpTleZk95+08kl2gF4rixG7+V/dwL6Q=
6977
github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I=
7078
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
79+
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
80+
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
7181
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
7282
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
7383
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -146,12 +156,13 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
146156
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
147157
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
148158
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
149-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
150159
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
160+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
161+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
151162
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
152163
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
153164
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
154-
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
155-
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
165+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
166+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
156167
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
157168
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

0 commit comments

Comments
 (0)