Skip to content

Commit d840daf

Browse files
authored
Merge branch 'ydb-platform:master' into master
2 parents 14887df + 7d5e6a0 commit d840daf

Some content is hidden

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

46 files changed

+435
-150
lines changed

.github/workflows/check-codegen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ ubuntu-latest ]
17-
go-version: [1.20.x, 1.21.x]
17+
go-version: [1.21.x, 1.22.x]
1818
runs-on: ${{ matrix.os }}
1919
steps:
2020
- name: Checkout
@@ -32,7 +32,7 @@ jobs:
3232
- name: Build
3333
run: |
3434
go install ./internal/cmd/gtrace
35-
go install go.uber.org/mock/mockgen@892b665398ecece7c7a900d2a2f2fa3dac07e4c4
35+
go install go.uber.org/mock/mockgen@v0.4.0
3636
3737
- name: Clean and re-generate *_gtrace.go files
3838
run: |

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
TAG="v$MAJOR.$MINOR.$PATCH";
7171
fi;
7272
git tag $TAG
73-
git push --tags && git push
73+
git push && git push --tags
7474
CHANGELOG="$CHANGELOG
7575
7676
Full Changelog: [$LAST_TAG...$TAG](https://github.com/ydb-platform/ydb-go-sdk/compare/$LAST_TAG...$TAG)"

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
go-version: [1.20.x, 1.21.x]
17+
go-version: [1.21.x, 1.22.x]
1818
os: [ubuntu, windows, macOS]
1919
env:
2020
OS: ${{ matrix.os }}-latest
@@ -44,8 +44,8 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
go-version: [1.20.x, 1.21.x]
48-
ydb-version: [22.5, 23.1, 23.2, 23.3]
47+
go-version: [1.21.x, 1.22.x]
48+
ydb-version: [22.5, 23.1, 23.2, 23.3, 24.1]
4949
services:
5050
ydb:
5151
image: cr.yandex/yc/yandex-docker-local-ydb:${{ matrix.ydb-version }}

.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ linters-settings:
112112
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
113113
# with golangci-lint call it on a directory with the changed file.
114114
check-exported: false
115+
gomoddirectives:
116+
replace-local: true
117+
replace-allow-list:
118+
- xorm.io/xorm
115119
gocritic:
116120
disabled-checks:
117121
- whyNoLint # https://github.com/go-critic/go-critic/issues/1063
@@ -231,7 +235,6 @@ linters:
231235
- goerr113
232236
- golint
233237
- gomnd
234-
- gomoddirectives
235238
- ifshort
236239
- interfacebloat
237240
- ireturn

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
## v3.56.1
2+
* Fixed fixenv usage (related to tests only)
3+
4+
## v3.56.0
5+
* Fixed handle of operational errors in topic streams
6+
* The minimum version of Go in `ydb-go-sdk` has been raised to `go1.21`
17
* Fixed topic writer infinite reconnections in some cases
28
* Refactored nil on err `internal/grpcwrapper/rawydb/issues.go`, when golangci-lint nilerr enabled
39
* Refactored nil on err `internal/grpcwrapper/rawtopic/describe_topic.go`, when golangci-lint nilerr enabled
410
* The names of internal errors fixed for `errname` linter
511

12+
## v3.55.3
13+
* Fixed handle of operational errors in topic streams (backported fix only)
14+
615
## v3.55.2
716
* Fixed init info in topic writer, when autoseq num turned off.
817

examples/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module examples
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/google/uuid v1.3.0

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/ydb-platform/ydb-go-sdk/v3
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/golang-jwt/jwt/v4 v4.4.1
@@ -15,7 +15,7 @@ require (
1515

1616
// requires for tests only
1717
require (
18-
github.com/rekby/fixenv v0.3.2
18+
github.com/rekby/fixenv v0.6.1
1919
github.com/stretchr/testify v1.7.1
2020
go.uber.org/mock v0.3.1-0.20231011042131-892b665398ec // indirect
2121
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
6060
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
6161
github.com/rekby/fixenv v0.3.2 h1:6AOdQ9Boaa/lOQJTY8GDmQRIhg3S3SD0mIEPkuDSkoQ=
6262
github.com/rekby/fixenv v0.3.2/go.mod h1:/b5LRc06BYJtslRtHKxsPWFT/ySpHV+rWvzTg+XWk4c=
63+
github.com/rekby/fixenv v0.6.1 h1:jUFiSPpajT4WY2cYuc++7Y1zWrnCxnovGCIX72PZniM=
64+
github.com/rekby/fixenv v0.6.1/go.mod h1:/b5LRc06BYJtslRtHKxsPWFT/ySpHV+rWvzTg+XWk4c=
6365
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
6466
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
6567
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=

internal/background/worker_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"context"
55
"runtime"
66
"sync"
7+
"sync/atomic"
78
"testing"
89
"time"
910

1011
"github.com/stretchr/testify/require"
1112

1213
"github.com/ydb-platform/ydb-go-sdk/v3/internal/empty"
13-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xatomic"
1414
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xtest"
1515
)
1616

@@ -75,7 +75,7 @@ func TestWorkerClose(t *testing.T) {
7575
w := NewWorker(ctx)
7676

7777
started := make(empty.Chan)
78-
stopped := xatomic.Bool{}
78+
stopped := atomic.Bool{}
7979
w.Start("test", func(innerCtx context.Context) {
8080
close(started)
8181
<-innerCtx.Done()
@@ -101,12 +101,12 @@ func TestWorkerConcurrentStartAndClose(t *testing.T) {
101101

102102
parallel := runtime.GOMAXPROCS(0)
103103

104-
var counter xatomic.Int64
104+
var counter atomic.Int64
105105

106106
ctx := xtest.Context(t)
107107
w := NewWorker(ctx)
108108

109-
stopNewStarts := xatomic.Bool{}
109+
stopNewStarts := atomic.Bool{}
110110
var wgStarters sync.WaitGroup
111111
for i := 0; i < parallel; i++ {
112112
wgStarters.Add(1)

internal/conn/conn.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66
"sync"
7+
"sync/atomic"
78
"time"
89

910
"github.com/ydb-platform/ydb-go-genproto/protos/Ydb"
@@ -16,7 +17,6 @@ import (
1617
"github.com/ydb-platform/ydb-go-sdk/v3/internal/meta"
1718
"github.com/ydb-platform/ydb-go-sdk/v3/internal/response"
1819
"github.com/ydb-platform/ydb-go-sdk/v3/internal/stack"
19-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xatomic"
2020
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xcontext"
2121
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors"
2222
"github.com/ydb-platform/ydb-go-sdk/v3/trace"
@@ -54,7 +54,7 @@ type conn struct {
5454
done chan struct{}
5555
endpoint endpoint.Endpoint // ro access
5656
closed bool
57-
state xatomic.Uint32
57+
state atomic.Uint32
5858
lastUsage time.Time
5959
onClose []func(*conn)
6060
onTransportErrors []func(ctx context.Context, cc Conn, cause error)
@@ -555,7 +555,7 @@ func getContextMark(ctx context.Context) *modificationMark {
555555
}
556556

557557
type modificationMark struct {
558-
dirty xatomic.Bool
558+
dirty atomic.Bool
559559
}
560560

561561
func (m *modificationMark) canRetry() bool {

0 commit comments

Comments
 (0)