Skip to content

Commit 025f13d

Browse files
authored
Modernise dep stack (tonic 0.14, prost 0.14, …) + encoding-size setter (#9)
1 parent d04bae8 commit 025f13d

66 files changed

Lines changed: 1754 additions & 3391 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
name: check
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2121
- name: Install Protoc
22-
uses: arduino/setup-protoc@v1
22+
uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1
2323
with:
2424
version: '3.x'
2525
repo-token: ${{ secrets.GITHUB_TOKEN }}
2626
- name: Rust Cache
27-
uses: Swatinem/rust-cache@v2
27+
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
2828
- name: make check
2929
run: make check
3030
- name: Catch unexpected changes in the generated code
@@ -38,16 +38,18 @@ jobs:
3838
NEXTEST_PROFILE: ci
3939
runs-on: ubuntu-latest
4040
steps:
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4242
- name: Install Protoc
43-
uses: arduino/setup-protoc@v1
43+
uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1
4444
with:
4545
version: '3.x'
4646
repo-token: ${{ secrets.GITHUB_TOKEN }}
4747
- name: Rust Cache
48-
uses: Swatinem/rust-cache@v2
48+
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
4949
- name: Install latest nextest release
50-
uses: taiki-e/install-action@nextest
50+
uses: taiki-e/install-action@d9be7d8cda89035c9c843f78bd44d4f72d8403d4 # v2
51+
with:
52+
tool: nextest
5153
- name: unit test
5254
run: make unit-test
5355

@@ -64,14 +66,14 @@ jobs:
6466
RUST_LOG: info
6567
runs-on: ubuntu-latest
6668
steps:
67-
- uses: actions/checkout@v4
69+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
6870
- name: Install Protoc
69-
uses: arduino/setup-protoc@v1
71+
uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1
7072
with:
7173
version: '3.x'
7274
repo-token: ${{ secrets.GITHUB_TOKEN }}
7375
- name: Rust Cache
74-
uses: Swatinem/rust-cache@v2
76+
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
7577
- name: install tiup
7678
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
7779
- name: start tiup playground
@@ -85,12 +87,14 @@ jobs:
8587
sleep 1
8688
done
8789
- name: Install latest nextest release
88-
uses: taiki-e/install-action@nextest
90+
uses: taiki-e/install-action@d9be7d8cda89035c9c843f78bd44d4f72d8403d4 # v2
91+
with:
92+
tool: nextest
8993
- name: Integration test
9094
run: MULTI_REGION=1 make ${{ matrix.case }}
9195
- name: Upload logs
9296
if: failure()
93-
uses: actions/upload-artifact@v4
97+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
9498
with:
9599
name: cluster-logs
96100
path: |

Cargo.toml

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "surrealdb-tikv-client"
3-
version = "0.3.0-surreal.4"
3+
version = "0.5.0"
44
keywords = ["TiKV", "KV", "distributed-systems"]
55
license = "Apache-2.0"
66
authors = ["The TiKV Project Authors"]
7-
repository = "https://github.com/tikv/client-rust"
8-
description = "The Rust language implementation of TiKV client."
7+
repository = "https://github.com/surrealdb/tikv-client"
8+
description = "The Rust language implementation of TiKV client (SurrealDB fork)."
99
edition = "2021"
1010

1111
[features]
@@ -25,42 +25,53 @@ members = [
2525
]
2626

2727
[dependencies]
28-
async-recursion = "0.3"
28+
async-recursion = "1.1"
2929
async-trait = "0.1"
30-
derive-new = "0.5"
31-
either = "1.6"
32-
fail = "0.4"
33-
futures = { version = "0.3" }
34-
lazy_static = "1"
30+
derive-new = "0.7"
31+
either = "1.15"
32+
fail = "0.5"
33+
futures = "0.3"
3534
log = "0.4"
36-
pin-project = "1"
37-
prometheus = { version = "0.13", default-features = false }
38-
prost = "0.12"
39-
rand = "0.8"
35+
pin-project = "1.1"
36+
prometheus = { version = "0.14", default-features = false }
37+
prost = "0.14"
38+
rand = "0.9"
4039
regex = "1"
4140
semver = "1.0"
4241
serde = "1.0"
4342
serde_derive = "1.0"
44-
serde_json = "1"
4543
take_mut = "0.2.2"
46-
thiserror = "1"
44+
thiserror = "2"
4745
tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] }
48-
tonic = { version = "0.10", features = ["tls"] }
46+
tonic = { version = "0.14", features = ["tls-native-roots"] }
47+
tonic-prost = "0.14"
48+
49+
# Upstream `tikv/client-rust`'s `[dev-dependencies]` block was much
50+
# heavier (clap 2, env_logger, proptest, proptest-derive, reqwest,
51+
# rstest, tempfile) because it served the CLI examples and the
52+
# in-crate proptest derives — both of which were dropped during the
53+
# SurrealDB fork's modernisation. What's left below is the strict
54+
# minimum the `tests/` tree still needs to exercise the live-cluster
55+
# integration suite against a TiKV cluster.
56+
#
57+
# `serial_test 3.x` replaces the previous 0.5 pin: the latter pulled
58+
# in `parking_lot 0.11` / `instant` (RUSTSEC-2024-0384). 3.x drops
59+
# both. The `#[serial]` attribute API has been stable across the bump.
4960

5061
[dev-dependencies]
51-
clap = "2"
52-
env_logger = "0.10"
53-
fail = { version = "0.4", features = ["failpoints"] }
54-
proptest = "1"
55-
proptest-derive = "0.5.1"
56-
reqwest = { version = "0.11", features = ["json", "native-tls-vendored"] }
57-
rstest = "0.18.2"
62+
env_logger = "0.11"
63+
fail = { version = "0.5", features = ["failpoints"] }
64+
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
5865
serde_json = "1"
59-
serial_test = "0.5.0"
60-
tempfile = "3.6"
66+
serial_test = "3"
6167
tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] }
6268

6369
[[test]]
6470
name = "failpoint_tests"
6571
path = "tests/failpoint_tests.rs"
6672
required-features = ["fail/failpoints"]
73+
74+
[[test]]
75+
name = "integration_tests"
76+
path = "tests/integration_tests.rs"
77+
required-features = ["integration-tests"]

examples/common/mod.rs

Lines changed: 0 additions & 71 deletions
This file was deleted.

examples/pessimistic.rs

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)