Skip to content

Commit 802b361

Browse files
authored
chore: Bump prost to 0.12 and tonic to 0.10 (#430)
* chore: Bump prost to 0.12 and tonic to 0.10 Signed-off-by: Xuanwo <github@xuanwo.io> * Fix build Signed-off-by: Xuanwo <github@xuanwo.io> * Commit changes Signed-off-by: Xuanwo <github@xuanwo.io> --------- Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent a7885be commit 802b361

18 files changed

+224
-224
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ lazy_static = "1"
3434
log = "0.4"
3535
pin-project = "1"
3636
prometheus = { version = "0.13", features = ["push"], default-features = false }
37-
prost = "0.11"
37+
prost = "0.12"
3838
rand = "0.8"
3939
regex = "1"
4040
semver = "1.0"
4141
serde = "1.0"
4242
serde_derive = "1.0"
4343
thiserror = "1"
4444
tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] }
45-
tonic = { version = "0.9", features = ["tls"] }
45+
tonic = { version = "0.10", features = ["tls"] }
4646

4747
[dev-dependencies]
4848
clap = "2"

proto-build/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@ edition = "2021"
1212

1313
[dependencies]
1414
glob = "0.3"
15-
tonic-build = "0.9"
16-
# Suppress doctest bug (https://stackoverflow.com/questions/66074003/how-to-turn-off-cargo-doc-test-and-compile-for-a-specific-module-in-rust)
17-
tonic-disable-doctest = "0.1.0"
15+
tonic-build = { version = "0.10", features = ["cleanup-markdown"] }

proto-build/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// Copyright 2023 TiKV Project Authors. Licensed under Apache-2.0.
22

33
fn main() {
4-
use tonic_disable_doctest::BuilderEx;
5-
64
tonic_build::configure()
7-
.disable_doctests_for_types([".google.api.HttpRule"])
85
.emit_rerun_if_changed(false)
96
.build_server(false)
107
.include_file("mod.rs")

src/generated/backup.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub struct BackupMeta {
1515
pub version: i32,
1616
/// A set of files that compose a backup.
1717
/// Note: `files` is deprecated, as it bloats backupmeta. It is kept for
18-
/// compatibility, so new BR can restore older backups.
18+
/// compatibility, so new BR can restore older backups.
1919
#[prost(message, repeated, tag = "4")]
2020
pub files: ::prost::alloc::vec::Vec<File>,
2121
/// An index to files contains data files.
@@ -25,14 +25,14 @@ pub struct BackupMeta {
2525
/// For full backup, the start_version equals to the end_version,
2626
/// it means point in time.
2727
/// For incremental backup, the time range is specified as
28-
/// (start_version, end_version].
28+
/// (start_version, end_version\].
2929
#[prost(uint64, tag = "5")]
3030
pub start_version: u64,
3131
#[prost(uint64, tag = "6")]
3232
pub end_version: u64,
3333
/// Table metadata describes database and table info.
3434
/// Note: `schemas` is deprecated, as it bloats backupmeta. It is kept for
35-
/// compatibility, so new BR can restore older backups.
35+
/// compatibility, so new BR can restore older backups.
3636
#[prost(message, repeated, tag = "7")]
3737
pub schemas: ::prost::alloc::vec::Vec<Schema>,
3838
/// An index to files contains Schemas.
@@ -43,16 +43,16 @@ pub struct BackupMeta {
4343
#[prost(bool, tag = "8")]
4444
pub is_raw_kv: bool,
4545
/// Note: `raw_ranges` is deprecated, as it bloats backupmeta. It is kept for
46-
/// compatibility, so new BR can restore older backups.
46+
/// compatibility, so new BR can restore older backups.
4747
#[prost(message, repeated, tag = "9")]
4848
pub raw_ranges: ::prost::alloc::vec::Vec<RawRange>,
4949
/// An index to files contains RawRanges.
5050
#[prost(message, optional, tag = "15")]
5151
pub raw_range_index: ::core::option::Option<MetaFile>,
5252
/// In incremental backup, DDLs which are completed in
53-
/// (lastBackupTS, backupTS] will be stored here.
53+
/// (lastBackupTS, backupTS\] will be stored here.
5454
/// Note: `raw_ranges` is deprecated, as it bloats backupmeta. It is kept for
55-
/// compatibility, so new BR can restore older backups.
55+
/// compatibility, so new BR can restore older backups.
5656
#[prost(bytes = "vec", tag = "10")]
5757
pub ddls: ::prost::alloc::vec::Vec<u8>,
5858
/// An index to files contains DDLs.
@@ -332,7 +332,7 @@ pub struct AzureBlobStorage {
332332
/// If the node's environment variables($AZURE_CLIENT_ID, $AZURE_TENANT_ID, $AZURE_CLIENT_SECRET) exist,
333333
/// prefer to use token to access the azure blob.
334334
///
335-
/// See <https://docs.microsoft.com/en-us/azure/storage/common/identity-library-acquire-token?toc=/azure/storage/blobs/toc.json>
335+
/// See <https://docs.microsoft.com/en-us/azure/storage/common/identity-library-acquire-token?toc=/azure/storage/blobs/toc.json>
336336
///
337337
/// Otherwise, if empty, try to read shared key from the node's environment variable $AZURE_STORAGE_KEY.
338338
#[prost(string, tag = "6")]
@@ -371,7 +371,7 @@ pub struct CloudDynamic {
371371
#[allow(clippy::derive_partial_eq_without_eq)]
372372
#[derive(Clone, PartialEq, ::prost::Message)]
373373
pub struct Hdfs {
374-
/// a URL: hdfs:///some/path or hdfs://host:port/some/path
374+
/// a URL: hdfs:///some/path or hdfs://host:port/some/path
375375
#[prost(string, tag = "1")]
376376
pub remote: ::prost::alloc::string::String,
377377
}

src/generated/coprocessor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// [start, end)
1+
/// \[start, end)
22
#[allow(clippy::derive_partial_eq_without_eq)]
33
#[derive(Clone, PartialEq, ::prost::Message)]
44
pub struct KeyRange {

src/generated/debugpb.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,12 +361,13 @@ pub mod debug_client {
361361
/// Debug service for TiKV.
362362
///
363363
/// Errors are defined as follow:
364-
/// - OK: Okay, we are good!
365-
/// - UNKNOWN: For unknown error.
366-
/// - INVALID_ARGUMENT: Something goes wrong within requests.
367-
/// - NOT_FOUND: It is key or region not found, it's based on context, detailed
368-
/// reason can be found in grpc message.
369-
/// Note: It bypasses raft layer.
364+
///
365+
/// * OK: Okay, we are good!
366+
/// * UNKNOWN: For unknown error.
367+
/// * INVALID_ARGUMENT: Something goes wrong within requests.
368+
/// * NOT_FOUND: It is key or region not found, it's based on context, detailed
369+
/// reason can be found in grpc message.
370+
/// Note: It bypasses raft layer.
370371
#[derive(Debug, Clone)]
371372
pub struct DebugClient<T> {
372373
inner: tonic::client::Grpc<T>,
@@ -539,7 +540,7 @@ pub mod debug_client {
539540
}
540541
/// Scan a specific range.
541542
/// Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
542-
/// Server uses keys directly w/o any encoding.
543+
/// Server uses keys directly w/o any encoding.
543544
pub async fn scan_mvcc(
544545
&mut self,
545546
request: impl tonic::IntoRequest<super::ScanMvccRequest>,

src/generated/diagnosticspb.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ pub struct ServerInfoItem {
9595
pub name: ::prost::alloc::string::String,
9696
/// all key-value pairs for specified item, e.g:
9797
/// ServerInfoItem {
98-
/// tp = "network"
99-
/// name = "eth0"
100-
/// paris = [
101-
/// ServerInfoPair { key = "readbytes", value = "4k"},
102-
/// ServerInfoPair { key = "writebytes", value = "1k"},
103-
/// ]
98+
/// tp = "network"
99+
/// name = "eth0"
100+
/// paris = \[
101+
/// ServerInfoPair { key = "readbytes", value = "4k"},
102+
/// ServerInfoPair { key = "writebytes", value = "1k"},
103+
/// \]
104104
/// }
105105
#[prost(message, repeated, tag = "3")]
106106
pub pairs: ::prost::alloc::vec::Vec<ServerInfoPair>,

0 commit comments

Comments
 (0)