Skip to content

Commit

Permalink
chore: Bump prost to 0.12 and tonic to 0.10 (#430)
Browse files Browse the repository at this point in the history
* chore: Bump prost to 0.12 and tonic to 0.10

Signed-off-by: Xuanwo <[email protected]>

* Fix build

Signed-off-by: Xuanwo <[email protected]>

* Commit changes

Signed-off-by: Xuanwo <[email protected]>

---------

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Nov 3, 2023
1 parent a7885be commit 802b361
Show file tree
Hide file tree
Showing 18 changed files with 224 additions and 224 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ lazy_static = "1"
log = "0.4"
pin-project = "1"
prometheus = { version = "0.13", features = ["push"], default-features = false }
prost = "0.11"
prost = "0.12"
rand = "0.8"
regex = "1"
semver = "1.0"
serde = "1.0"
serde_derive = "1.0"
thiserror = "1"
tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] }
tonic = { version = "0.9", features = ["tls"] }
tonic = { version = "0.10", features = ["tls"] }

[dev-dependencies]
clap = "2"
Expand Down
4 changes: 1 addition & 3 deletions proto-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ edition = "2021"

[dependencies]
glob = "0.3"
tonic-build = "0.9"
# Suppress doctest bug (https://stackoverflow.com/questions/66074003/how-to-turn-off-cargo-doc-test-and-compile-for-a-specific-module-in-rust)
tonic-disable-doctest = "0.1.0"
tonic-build = { version = "0.10", features = ["cleanup-markdown"] }
3 changes: 0 additions & 3 deletions proto-build/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// Copyright 2023 TiKV Project Authors. Licensed under Apache-2.0.

fn main() {
use tonic_disable_doctest::BuilderEx;

tonic_build::configure()
.disable_doctests_for_types([".google.api.HttpRule"])
.emit_rerun_if_changed(false)
.build_server(false)
.include_file("mod.rs")
Expand Down
16 changes: 8 additions & 8 deletions src/generated/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct BackupMeta {
pub version: i32,
/// A set of files that compose a backup.
/// Note: `files` is deprecated, as it bloats backupmeta. It is kept for
/// compatibility, so new BR can restore older backups.
/// compatibility, so new BR can restore older backups.
#[prost(message, repeated, tag = "4")]
pub files: ::prost::alloc::vec::Vec<File>,
/// An index to files contains data files.
Expand All @@ -25,14 +25,14 @@ pub struct BackupMeta {
/// For full backup, the start_version equals to the end_version,
/// it means point in time.
/// For incremental backup, the time range is specified as
/// (start_version, end_version].
/// (start_version, end_version\].
#[prost(uint64, tag = "5")]
pub start_version: u64,
#[prost(uint64, tag = "6")]
pub end_version: u64,
/// Table metadata describes database and table info.
/// Note: `schemas` is deprecated, as it bloats backupmeta. It is kept for
/// compatibility, so new BR can restore older backups.
/// compatibility, so new BR can restore older backups.
#[prost(message, repeated, tag = "7")]
pub schemas: ::prost::alloc::vec::Vec<Schema>,
/// An index to files contains Schemas.
Expand All @@ -43,16 +43,16 @@ pub struct BackupMeta {
#[prost(bool, tag = "8")]
pub is_raw_kv: bool,
/// Note: `raw_ranges` is deprecated, as it bloats backupmeta. It is kept for
/// compatibility, so new BR can restore older backups.
/// compatibility, so new BR can restore older backups.
#[prost(message, repeated, tag = "9")]
pub raw_ranges: ::prost::alloc::vec::Vec<RawRange>,
/// An index to files contains RawRanges.
#[prost(message, optional, tag = "15")]
pub raw_range_index: ::core::option::Option<MetaFile>,
/// In incremental backup, DDLs which are completed in
/// (lastBackupTS, backupTS] will be stored here.
/// (lastBackupTS, backupTS\] will be stored here.
/// Note: `raw_ranges` is deprecated, as it bloats backupmeta. It is kept for
/// compatibility, so new BR can restore older backups.
/// compatibility, so new BR can restore older backups.
#[prost(bytes = "vec", tag = "10")]
pub ddls: ::prost::alloc::vec::Vec<u8>,
/// An index to files contains DDLs.
Expand Down Expand Up @@ -332,7 +332,7 @@ pub struct AzureBlobStorage {
/// If the node's environment variables($AZURE_CLIENT_ID, $AZURE_TENANT_ID, $AZURE_CLIENT_SECRET) exist,
/// prefer to use token to access the azure blob.
///
/// See <https://docs.microsoft.com/en-us/azure/storage/common/identity-library-acquire-token?toc=/azure/storage/blobs/toc.json>
/// See <https://docs.microsoft.com/en-us/azure/storage/common/identity-library-acquire-token?toc=/azure/storage/blobs/toc.json>
///
/// Otherwise, if empty, try to read shared key from the node's environment variable $AZURE_STORAGE_KEY.
#[prost(string, tag = "6")]
Expand Down Expand Up @@ -371,7 +371,7 @@ pub struct CloudDynamic {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hdfs {
/// a URL: hdfs:///some/path or hdfs://host:port/some/path
/// a URL: hdfs:///some/path or hdfs://host:port/some/path
#[prost(string, tag = "1")]
pub remote: ::prost::alloc::string::String,
}
Expand Down
2 changes: 1 addition & 1 deletion src/generated/coprocessor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// [start, end)
/// \[start, end)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyRange {
Expand Down
15 changes: 8 additions & 7 deletions src/generated/debugpb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,13 @@ pub mod debug_client {
/// Debug service for TiKV.
///
/// Errors are defined as follow:
/// - OK: Okay, we are good!
/// - UNKNOWN: For unknown error.
/// - INVALID_ARGUMENT: Something goes wrong within requests.
/// - NOT_FOUND: It is key or region not found, it's based on context, detailed
/// reason can be found in grpc message.
/// Note: It bypasses raft layer.
///
/// * OK: Okay, we are good!
/// * UNKNOWN: For unknown error.
/// * INVALID_ARGUMENT: Something goes wrong within requests.
/// * NOT_FOUND: It is key or region not found, it's based on context, detailed
/// reason can be found in grpc message.
/// Note: It bypasses raft layer.
#[derive(Debug, Clone)]
pub struct DebugClient<T> {
inner: tonic::client::Grpc<T>,
Expand Down Expand Up @@ -539,7 +540,7 @@ pub mod debug_client {
}
/// Scan a specific range.
/// Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
/// Server uses keys directly w/o any encoding.
/// Server uses keys directly w/o any encoding.
pub async fn scan_mvcc(
&mut self,
request: impl tonic::IntoRequest<super::ScanMvccRequest>,
Expand Down
12 changes: 6 additions & 6 deletions src/generated/diagnosticspb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ pub struct ServerInfoItem {
pub name: ::prost::alloc::string::String,
/// all key-value pairs for specified item, e.g:
/// ServerInfoItem {
/// tp = "network"
/// name = "eth0"
/// paris = [
/// ServerInfoPair { key = "readbytes", value = "4k"},
/// ServerInfoPair { key = "writebytes", value = "1k"},
/// ]
/// tp = "network"
/// name = "eth0"
/// paris = \[
/// ServerInfoPair { key = "readbytes", value = "4k"},
/// ServerInfoPair { key = "writebytes", value = "1k"},
/// \]
/// }
#[prost(message, repeated, tag = "3")]
pub pairs: ::prost::alloc::vec::Vec<ServerInfoPair>,
Expand Down
Loading

0 comments on commit 802b361

Please sign in to comment.