Skip to content

Commit db11c88

Browse files
committed
Merge branch 'master' into fork/issues/850/flush
2 parents 0fe9c33 + d063e33 commit db11c88

File tree

591 files changed

+49902
-11658
lines changed

Some content is hidden

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

591 files changed

+49902
-11658
lines changed

.github/scripts/format-go-code.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ FILEPATH="$1"
66

77
gofmt -s -w "$FILEPATH"
88

9-
# https://github.com/rinchsan/gosimports
9+
# https://github.com/daixiang0/gci
1010
if [[ "$FILEPATH" == *"tests/slo/"* ]]
1111
then
12-
gosimports -local slo -w "$FILEPATH"
12+
gci write --skip-generated -s standard -s default -s "prefix(slo)" "$FILEPATH"
13+
elif [[ "$FILEPATH" == *"examples/"* ]]
14+
then
15+
gci write --skip-generated -s standard -s default -s "prefix(examples)" "$FILEPATH"
1316
else
14-
gosimports -local github.com/ydb-platform/ydb-go-sdk/v3 -w "$FILEPATH"
17+
gci write --skip-generated -s standard -s default -s "prefix(github.com/ydb-platform/ydb-go-sdk/v3)" "$FILEPATH"
1518
fi
1619

1720

.github/workflows/breaking.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,22 @@ jobs:
1111
group: broken-changes-${{ github.ref }}
1212
cancel-in-progress: true
1313
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: write
16+
contents: read
1417
steps:
1518
- name: Install Go
16-
uses: actions/setup-go@v3
19+
uses: actions/setup-go@v5
1720
with:
1821
go-version: "1.21"
1922
- name: Checkout code
20-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2124
- name: Install gorelease
2225
run: test -e ~/go/bin/gorelease || go install golang.org/x/exp/cmd/gorelease@latest
2326
- name: Check broken API changes
2427
run: gorelease -base=$GITHUB_BASE_REF 2>&1 > changes.txt | true
28+
- name: Print API changes
29+
run: cat changes.txt
2530
- name: Comment Report
2631
if: always()
2732
uses: marocchino/sticky-pull-request-comment@v2

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout sources
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Changelog updated
1616
uses: Zomzog/[email protected]

.github/workflows/check-codegen.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ 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
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Setup Go
24-
uses: actions/setup-go@v3
24+
uses: actions/setup-go@v5
2525
with:
2626
go-version: ${{ matrix.go-version }}
2727

@@ -32,13 +32,18 @@ jobs:
3232
- name: Build
3333
run: |
3434
go install ./internal/cmd/gtrace
35-
go install github.com/golang/mock/[email protected]
35+
go install ./internal/cmd/gstack
36+
go install go.uber.org/mock/[email protected]
3637
3738
- name: Clean and re-generate *_gtrace.go files
3839
run: |
3940
rm -f ./trace/*_gtrace.go
4041
go generate ./trace
4142
go generate ./...
4243
44+
- name: Re-generate stack.FunctionID calls
45+
run: |
46+
gstack .
47+
4348
- name: Check repository diff
4449
run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "code-generation not equal with committed"

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ jobs:
4545

4646
steps:
4747
- name: Checkout repository
48-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4949

5050
# Initializes the CodeQL tools for scanning.
5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@v2
52+
uses: github/codeql-action/init@v3
5353
with:
5454
languages: ${{ matrix.language }}
5555
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -63,7 +63,7 @@ jobs:
6363
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6464
# If this step fails, then you should remove it and run the build manually (see below)
6565
- name: Autobuild
66-
uses: github/codeql-action/autobuild@v2
66+
uses: github/codeql-action/autobuild@v3
6767

6868
# ℹ️ Command-line programs to run using the OS shell.
6969
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -76,4 +76,4 @@ jobs:
7676
# ./location_of_script_within_repo/buildscript.sh
7777

7878
- name: Perform CodeQL Analysis
79-
uses: github/codeql-action/analyze@v2
79+
uses: github/codeql-action/analyze@v3

.github/workflows/examples.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
ydb-version: [ 22.5, 23.1, 23.2 ]
19-
application: [ native, database_sql, gorm, xorm ]
18+
ydb-version: [ 23.3, 24.1 ]
19+
application: [ native/table, native/query, database_sql, gorm, xorm ]
2020
services:
2121
ydb:
22-
image: cr.yandex/crpsjg1coh47p81vh2lc/yandex-docker-local-ydb:${{ matrix.ydb-version }}
22+
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
2323
ports:
2424
- 2135:2135
2525
- 2136:2136
@@ -29,16 +29,18 @@ jobs:
2929
env:
3030
YDB_LOCAL_SURVIVE_RESTART: true
3131
YDB_USE_IN_MEMORY_PDISKS: true
32+
YDB_TABLE_ENABLE_PREPARED_DDL: true
3233
options: '-h localhost'
3334
env:
3435
OS: ubuntu-latest
3536
YDB_CONNECTION_STRING: grpc://localhost:2136/local
3637
YDB_ANONYMOUS_CREDENTIALS: 1
38+
YDB_VERSION: ${{ matrix.ydb-version }}
3739
steps:
3840
- name: Checkout code
39-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4042
- name: Install Go
41-
uses: actions/setup-go@v3
43+
uses: actions/setup-go@v5
4244
with:
4345
cache: true
4446
- name: Run basic example ${{ matrix.application }}
@@ -72,9 +74,9 @@ jobs:
7274
POSTGRES_CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/basic?sslmode=disable
7375
steps:
7476
- name: Checkout code
75-
uses: actions/checkout@v3
77+
uses: actions/checkout@v4
7678
- name: Install Go
77-
uses: actions/setup-go@v3
79+
uses: actions/setup-go@v5
7880
with:
7981
cache: true
8082
- name: Run basic example ${{ matrix.application }} with postgres
@@ -95,9 +97,9 @@ jobs:
9597
SQLITE_CONNECTION_STRING: ${{ matrix.application }}.db
9698
steps:
9799
- name: Checkout code
98-
uses: actions/checkout@v3
100+
uses: actions/checkout@v4
99101
- name: Install Go
100-
uses: actions/setup-go@v3
102+
uses: actions/setup-go@v5
101103
with:
102104
cache: true
103105
- name: Run basic example ${{ matrix.application }} with sqlite

.github/workflows/lint.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- release-*
77
pull_request:
88
workflow_dispatch:
9+
env:
10+
GOLANGCI_LINT_VERSION: v1.55.2
911
jobs:
1012
golangci:
1113
name: golangci-lint
@@ -14,27 +16,27 @@ jobs:
1416
cancel-in-progress: true
1517
runs-on: ubuntu-latest
1618
steps:
17-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1820
- name: golangci-lint
19-
uses: golangci/golangci-lint-action@v3
21+
uses: golangci/golangci-lint-action@v4
2022
with:
21-
version: v1.52.0
23+
version: ${{ env.GOLANGCI_LINT_VERSION }}
24+
args: --timeout=5m
2225
golangci-examples:
2326
name: golangci-lint-examples
2427
concurrency:
2528
group: lint-golangci-examples-${{ github.ref }}
2629
cancel-in-progress: true
2730
runs-on: ubuntu-latest
2831
steps:
29-
- uses: actions/checkout@v3
30-
32+
- uses: actions/checkout@v4
3133
- name: generate examples golangci-lint config
3234
run: sed 's/github.com\/ydb-platform\/ydb-go-sdk\/v3/examples/g' .golangci.yml > examples/.golangci.yml
33-
3435
- name: golangci-lint
35-
uses: golangci/golangci-lint-action@v3
36+
uses: golangci/golangci-lint-action@v4
3637
with:
37-
version: v1.52.0
38+
version: ${{ env.GOLANGCI_LINT_VERSION }}
39+
args: --timeout=5m
3840
working-directory: examples
3941
golangci-slo:
4042
name: golangci-lint-slo
@@ -43,15 +45,14 @@ jobs:
4345
cancel-in-progress: true
4446
runs-on: ubuntu-latest
4547
steps:
46-
- uses: actions/checkout@v3
47-
48+
- uses: actions/checkout@v4
4849
- name: generate slo golangci-lint config
4950
run: sed 's/github.com\/ydb-platform\/ydb-go-sdk\/v3/slo/g' .golangci.yml > tests/slo/.golangci.yml
50-
5151
- name: golangci-lint
52-
uses: golangci/golangci-lint-action@v3
52+
uses: golangci/golangci-lint-action@v4
5353
with:
54-
version: v1.52.0
54+
version: ${{ env.GOLANGCI_LINT_VERSION }}
55+
args: --timeout=5m
5556
working-directory: tests/slo
5657
autoformatter:
5758
name: autoformat check
@@ -60,20 +61,16 @@ jobs:
6061
cancel-in-progress: true
6162
runs-on: ubuntu-latest
6263
steps:
63-
- uses: actions/checkout@v3
64-
64+
- uses: actions/checkout@v4
6565
- name: Install Go
66-
uses: actions/setup-go@v3
66+
uses: actions/setup-go@v5
6767
with:
6868
go-version: "1.21"
69-
7069
- name: Install utilities
7170
run: |
7271
go install mvdan.cc/[email protected]
73-
go install github.com/rinchsan/gosimports/cmd/[email protected]
74-
72+
go install github.com/daixiang0/[email protected]
7573
- name: format all files with auto-formatter
7674
run: bash ./.github/scripts/format-all-go-code.sh "$PWD"
77-
7875
- name: Check repository diff
7976
run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken"

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
CHANGELOG_FILE: CHANGELOG.md
2929
GITHUB_TOKEN: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
with:
3333
token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
3434
fetch-depth: 0
@@ -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/slo.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ jobs:
2121

2222
steps:
2323
- name: Checkout repository
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

2626
- name: Run SLO
2727
uses: ydb-platform/slo-tests@js-version
28+
continue-on-error: true
2829
with:
2930
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3031
KUBECONFIG_B64: ${{ secrets.SLO_KUBE_CONFIG }}
@@ -42,31 +43,37 @@ jobs:
4243
timeBetweenPhases: 30
4344
shutdownTime: 30
4445

45-
language_id0: 'native'
46+
language_id0: 'native-table'
4647
workload_path0: 'tests/slo'
47-
language0: 'Go SDK native'
48+
language0: 'Native ydb-go-sdk/v3 over table-service'
4849
workload_build_context0: ../..
49-
workload_build_options0: -f Dockerfile --build-arg SRC_PATH=native --build-arg JOB_NAME=workload-native
50+
workload_build_options0: -f Dockerfile --build-arg SRC_PATH=native/table --build-arg JOB_NAME=workload-native-table
5051

51-
language_id1: 'databasesql'
52+
language_id1: 'native-query'
5253
workload_path1: 'tests/slo'
53-
language1: 'Go SDK database/sql'
54+
language1: 'Native ydb-go-sdk/v3 over query-service'
5455
workload_build_context1: ../..
55-
workload_build_options1: -f Dockerfile --build-arg SRC_PATH=database/sql --build-arg JOB_NAME=workload-databasesql
56+
workload_build_options1: -f Dockerfile --build-arg SRC_PATH=native/query --build-arg JOB_NAME=workload-native-query
5657

57-
language_id2: 'gorm'
58+
language_id2: 'database-sql'
5859
workload_path2: 'tests/slo'
59-
language2: 'Go SDK gorm'
60+
language2: 'Go SDK database/sql'
6061
workload_build_context2: ../..
61-
workload_build_options2: -f Dockerfile --build-arg SRC_PATH=gorm --build-arg JOB_NAME=workload-gorm
62+
workload_build_options2: -f Dockerfile --build-arg SRC_PATH=database/sql --build-arg JOB_NAME=workload-database-sql
6263

63-
language_id3: 'xorm'
64+
language_id3: 'gorm'
6465
workload_path3: 'tests/slo'
65-
language3: 'Go SDK xorm'
66+
language3: 'Go SDK gorm'
6667
workload_build_context3: ../..
67-
workload_build_options3: -f Dockerfile --build-arg SRC_PATH=xorm --build-arg JOB_NAME=workload-xorm
68+
workload_build_options3: -f Dockerfile --build-arg SRC_PATH=gorm --build-arg JOB_NAME=workload-gorm
6869

69-
- uses: actions/upload-artifact@v3
70+
language_id4: 'xorm'
71+
workload_path4: 'tests/slo'
72+
language4: 'Go SDK xorm'
73+
workload_build_context4: ../..
74+
workload_build_options4: -f Dockerfile --build-arg SRC_PATH=xorm --build-arg JOB_NAME=workload-xorm
75+
76+
- uses: actions/upload-artifact@v4
7077
if: always()
7178
with:
7279
name: slo-logs

0 commit comments

Comments
 (0)