Skip to content

Commit 9790829

Browse files
Copilotgaius-qi
andauthored
Upgrade tonic, tonic-reflection, and tonic-health to 0.14.3 (#639)
* Initial plan * Upgrade tonic, tonic-reflection, tonic-health to 0.14.3 Co-authored-by: gaius-qi <15955374+gaius-qi@users.noreply.github.com> * build: remove tonic-reflection and tonic-health deps, bump to 2.2.25 Signed-off-by: Gaius <gaius.qi@gmail.com> --------- Signed-off-by: Gaius <gaius.qi@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: gaius-qi <15955374+gaius-qi@users.noreply.github.com> Co-authored-by: Gaius <gaius.qi@gmail.com>
1 parent 2769929 commit 9790829

8 files changed

Lines changed: 1414 additions & 1616 deletions

File tree

Cargo.lock

Lines changed: 405 additions & 406 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dragonfly-api"
3-
version = "2.2.24"
3+
version = "2.2.25"
44
authors = ["Gaius <gaius.qi@gmail.com>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -11,12 +11,13 @@ readme = "README.md"
1111

1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1313
[dependencies]
14-
tonic = "0.12.3"
15-
prost = "0.13.5"
14+
tonic = "0.14.3"
15+
tonic-prost = "0.14.3"
16+
prost = "0.14.3"
1617
prost-types = "0.14.3"
1718
tokio = { version = "1.50.0", features = ["rt-multi-thread", "macros"] }
1819
serde = { version = "1.0", features = ["derive"] }
19-
prost-wkt-types = "0.6"
20+
prost-wkt-types = "0.7"
2021

2122
[build-dependencies]
22-
tonic-build = "0.12.1"
23+
tonic-prost-build = "0.14.3"

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() -> Result<(), Box<dyn std::error::Error>> {
2-
tonic_build::configure()
2+
tonic_prost_build::configure()
33
.file_descriptor_set_path("src/descriptor.bin")
44
.protoc_arg("--experimental_allow_proto3_optional")
55
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
@@ -14,7 +14,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
1414
.extern_path(".google.protobuf.Timestamp", "::prost_wkt_types::Timestamp")
1515
.extern_path(".google.protobuf.Duration", "::prost_wkt_types::Duration")
1616
.out_dir("src")
17-
.compile(
17+
.compile_protos(
1818
&[
1919
"proto/common.proto",
2020
"proto/errordetails.proto",

src/common.v2.rs

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// This file is @generated by prost-build.
22
/// Peer metadata.
33
#[derive(serde::Serialize, serde::Deserialize)]
4-
#[allow(clippy::derive_partial_eq_without_eq)]
54
#[derive(Clone, PartialEq, ::prost::Message)]
65
pub struct Peer {
76
/// Peer id.
@@ -43,7 +42,6 @@ pub struct Peer {
4342
}
4443
/// CachePeer metadata.
4544
#[derive(serde::Serialize, serde::Deserialize)]
46-
#[allow(clippy::derive_partial_eq_without_eq)]
4745
#[derive(Clone, PartialEq, ::prost::Message)]
4846
pub struct CachePeer {
4947
/// Peer id.
@@ -85,7 +83,6 @@ pub struct CachePeer {
8583
}
8684
/// PersistentPeer metadata.
8785
#[derive(serde::Serialize, serde::Deserialize)]
88-
#[allow(clippy::derive_partial_eq_without_eq)]
8986
#[derive(Clone, PartialEq, ::prost::Message)]
9087
pub struct PersistentPeer {
9188
/// Peer id.
@@ -121,7 +118,6 @@ pub struct PersistentPeer {
121118
}
122119
/// PersistentCachePeer metadata.
123120
#[derive(serde::Serialize, serde::Deserialize)]
124-
#[allow(clippy::derive_partial_eq_without_eq)]
125121
#[derive(Clone, PartialEq, ::prost::Message)]
126122
pub struct PersistentCachePeer {
127123
/// Peer id.
@@ -157,7 +153,6 @@ pub struct PersistentCachePeer {
157153
}
158154
/// Task metadata.
159155
#[derive(serde::Serialize, serde::Deserialize)]
160-
#[allow(clippy::derive_partial_eq_without_eq)]
161156
#[derive(Clone, PartialEq, ::prost::Message)]
162157
pub struct Task {
163158
/// Task id.
@@ -226,7 +221,6 @@ pub struct Task {
226221
}
227222
/// CacheTask metadata.
228223
#[derive(serde::Serialize, serde::Deserialize)]
229-
#[allow(clippy::derive_partial_eq_without_eq)]
230224
#[derive(Clone, PartialEq, ::prost::Message)]
231225
pub struct CacheTask {
232226
/// Task id.
@@ -295,8 +289,7 @@ pub struct CacheTask {
295289
}
296290
/// PersistentTask metadata.
297291
#[derive(serde::Serialize, serde::Deserialize)]
298-
#[allow(clippy::derive_partial_eq_without_eq)]
299-
#[derive(Clone, PartialEq, ::prost::Message)]
292+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
300293
pub struct PersistentTask {
301294
/// Task id.
302295
#[prost(string, tag = "1")]
@@ -336,8 +329,7 @@ pub struct PersistentTask {
336329
}
337330
/// PersistentCacheTask metadata.
338331
#[derive(serde::Serialize, serde::Deserialize)]
339-
#[allow(clippy::derive_partial_eq_without_eq)]
340-
#[derive(Clone, PartialEq, ::prost::Message)]
332+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
341333
pub struct PersistentCacheTask {
342334
/// Task id.
343335
#[prost(string, tag = "1")]
@@ -386,7 +378,6 @@ pub struct PersistentCacheTask {
386378
}
387379
/// Host metadata.
388380
#[derive(serde::Serialize, serde::Deserialize)]
389-
#[allow(clippy::derive_partial_eq_without_eq)]
390381
#[derive(Clone, PartialEq, ::prost::Message)]
391382
pub struct Host {
392383
/// Host id.
@@ -453,7 +444,6 @@ pub struct Host {
453444
}
454445
/// CPU Stat.
455446
#[derive(serde::Serialize, serde::Deserialize)]
456-
#[allow(clippy::derive_partial_eq_without_eq)]
457447
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
458448
pub struct Cpu {
459449
/// Number of logical cores in the system.
@@ -477,7 +467,6 @@ pub struct Cpu {
477467
}
478468
/// Cgroup CPU Stat.
479469
#[derive(serde::Serialize, serde::Deserialize)]
480-
#[allow(clippy::derive_partial_eq_without_eq)]
481470
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
482471
pub struct CgroupCpu {
483472
/// CFS period in microseconds.
@@ -493,7 +482,6 @@ pub struct CgroupCpu {
493482
/// CPUTimes contains the amounts of time the CPU has spent performing different
494483
/// kinds of work. Time units are in seconds.
495484
#[derive(serde::Serialize, serde::Deserialize)]
496-
#[allow(clippy::derive_partial_eq_without_eq)]
497485
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
498486
pub struct CpuTimes {
499487
/// CPU time of user.
@@ -529,7 +517,6 @@ pub struct CpuTimes {
529517
}
530518
/// Memory Stat.
531519
#[derive(serde::Serialize, serde::Deserialize)]
532-
#[allow(clippy::derive_partial_eq_without_eq)]
533520
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
534521
pub struct Memory {
535522
/// Total amount of RAM on this system.
@@ -556,7 +543,6 @@ pub struct Memory {
556543
}
557544
/// Cgroup Memory Stat.
558545
#[derive(serde::Serialize, serde::Deserialize)]
559-
#[allow(clippy::derive_partial_eq_without_eq)]
560546
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
561547
pub struct CgroupMemory {
562548
/// Limit is the memory limit in bytes.
@@ -571,8 +557,7 @@ pub struct CgroupMemory {
571557
}
572558
/// Network Stat.
573559
#[derive(serde::Serialize, serde::Deserialize)]
574-
#[allow(clippy::derive_partial_eq_without_eq)]
575-
#[derive(Clone, PartialEq, ::prost::Message)]
560+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
576561
pub struct Network {
577562
/// Return count of tcp connections opened and status is ESTABLISHED.
578563
#[prost(uint32, tag = "1")]
@@ -601,7 +586,6 @@ pub struct Network {
601586
}
602587
/// Disk Stat.
603588
#[derive(serde::Serialize, serde::Deserialize)]
604-
#[allow(clippy::derive_partial_eq_without_eq)]
605589
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
606590
pub struct Disk {
607591
/// Total amount of disk on the data path of dragonfly.
@@ -637,8 +621,7 @@ pub struct Disk {
637621
}
638622
/// Build information.
639623
#[derive(serde::Serialize, serde::Deserialize)]
640-
#[allow(clippy::derive_partial_eq_without_eq)]
641-
#[derive(Clone, PartialEq, ::prost::Message)]
624+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
642625
pub struct Build {
643626
/// Git version.
644627
#[prost(string, tag = "1")]
@@ -658,7 +641,6 @@ pub struct Build {
658641
}
659642
/// Download information.
660643
#[derive(serde::Serialize, serde::Deserialize)]
661-
#[allow(clippy::derive_partial_eq_without_eq)]
662644
#[derive(Clone, PartialEq, ::prost::Message)]
663645
pub struct Download {
664646
/// Download url.
@@ -783,8 +765,7 @@ pub struct Download {
783765
}
784766
/// Object Storage related information.
785767
#[derive(serde::Serialize, serde::Deserialize)]
786-
#[allow(clippy::derive_partial_eq_without_eq)]
787-
#[derive(Clone, PartialEq, ::prost::Message)]
768+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
788769
pub struct ObjectStorage {
789770
/// Region is the region of the object storage service.
790771
#[prost(string, optional, tag = "1")]
@@ -816,17 +797,15 @@ pub struct ObjectStorage {
816797
}
817798
/// HDFS related information.
818799
#[derive(serde::Serialize, serde::Deserialize)]
819-
#[allow(clippy::derive_partial_eq_without_eq)]
820-
#[derive(Clone, PartialEq, ::prost::Message)]
800+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
821801
pub struct Hdfs {
822802
/// Delegation token for Web HDFS operator.
823803
#[prost(string, optional, tag = "1")]
824804
pub delegation_token: ::core::option::Option<::prost::alloc::string::String>,
825805
}
826806
/// HuggingFace related information.
827807
#[derive(serde::Serialize, serde::Deserialize)]
828-
#[allow(clippy::derive_partial_eq_without_eq)]
829-
#[derive(Clone, PartialEq, ::prost::Message)]
808+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
830809
pub struct HuggingFace {
831810
/// Access token for HuggingFace Hub.
832811
#[prost(string, optional, tag = "1")]
@@ -838,8 +817,7 @@ pub struct HuggingFace {
838817
}
839818
/// ModelScope related information.
840819
#[derive(serde::Serialize, serde::Deserialize)]
841-
#[allow(clippy::derive_partial_eq_without_eq)]
842-
#[derive(Clone, PartialEq, ::prost::Message)]
820+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
843821
pub struct ModelScope {
844822
/// Access token for ModelScope Hub.
845823
#[prost(string, optional, tag = "1")]
@@ -851,8 +829,7 @@ pub struct ModelScope {
851829
}
852830
/// Range represents download range.
853831
#[derive(serde::Serialize, serde::Deserialize)]
854-
#[allow(clippy::derive_partial_eq_without_eq)]
855-
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
832+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
856833
pub struct Range {
857834
/// Start of range.
858835
#[prost(uint64, tag = "1")]
@@ -863,8 +840,7 @@ pub struct Range {
863840
}
864841
/// Piece represents information of piece.
865842
#[derive(serde::Serialize, serde::Deserialize)]
866-
#[allow(clippy::derive_partial_eq_without_eq)]
867-
#[derive(Clone, PartialEq, ::prost::Message)]
843+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
868844
pub struct Piece {
869845
/// Piece number.
870846
#[prost(uint32, tag = "1")]
@@ -901,9 +877,9 @@ pub struct Piece {
901877
pub enum SizeScope {
902878
/// size > one piece size.
903879
Normal = 0,
904-
/// 128 byte < size <= one piece size and be plain type.
880+
/// 128 byte \< size \<= one piece size and be plain type.
905881
Small = 1,
906-
/// size <= 128 byte and be plain type.
882+
/// size \<= 128 byte and be plain type.
907883
Tiny = 2,
908884
/// size == 0 byte and be plain type.
909885
Empty = 3,
@@ -915,10 +891,10 @@ impl SizeScope {
915891
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
916892
pub fn as_str_name(&self) -> &'static str {
917893
match self {
918-
SizeScope::Normal => "NORMAL",
919-
SizeScope::Small => "SMALL",
920-
SizeScope::Tiny => "TINY",
921-
SizeScope::Empty => "EMPTY",
894+
Self::Normal => "NORMAL",
895+
Self::Small => "SMALL",
896+
Self::Tiny => "TINY",
897+
Self::Empty => "EMPTY",
922898
}
923899
}
924900
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -967,10 +943,10 @@ impl TaskType {
967943
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
968944
pub fn as_str_name(&self) -> &'static str {
969945
match self {
970-
TaskType::Standard => "STANDARD",
971-
TaskType::Persistent => "PERSISTENT",
972-
TaskType::PersistentCache => "PERSISTENT_CACHE",
973-
TaskType::Cache => "CACHE",
946+
Self::Standard => "STANDARD",
947+
Self::Persistent => "PERSISTENT",
948+
Self::PersistentCache => "PERSISTENT_CACHE",
949+
Self::Cache => "CACHE",
974950
}
975951
}
976952
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1003,9 +979,9 @@ impl TrafficType {
1003979
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
1004980
pub fn as_str_name(&self) -> &'static str {
1005981
match self {
1006-
TrafficType::BackToSource => "BACK_TO_SOURCE",
1007-
TrafficType::RemotePeer => "REMOTE_PEER",
1008-
TrafficType::LocalPeer => "LOCAL_PEER",
982+
Self::BackToSource => "BACK_TO_SOURCE",
983+
Self::RemotePeer => "REMOTE_PEER",
984+
Self::LocalPeer => "LOCAL_PEER",
1009985
}
1010986
}
1011987
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1057,13 +1033,13 @@ impl Priority {
10571033
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
10581034
pub fn as_str_name(&self) -> &'static str {
10591035
match self {
1060-
Priority::Level0 => "LEVEL0",
1061-
Priority::Level1 => "LEVEL1",
1062-
Priority::Level2 => "LEVEL2",
1063-
Priority::Level3 => "LEVEL3",
1064-
Priority::Level4 => "LEVEL4",
1065-
Priority::Level5 => "LEVEL5",
1066-
Priority::Level6 => "LEVEL6",
1036+
Self::Level0 => "LEVEL0",
1037+
Self::Level1 => "LEVEL1",
1038+
Self::Level2 => "LEVEL2",
1039+
Self::Level3 => "LEVEL3",
1040+
Self::Level4 => "LEVEL4",
1041+
Self::Level5 => "LEVEL5",
1042+
Self::Level6 => "LEVEL6",
10671043
}
10681044
}
10691045
/// Creates an enum from field names used in the ProtoBuf definition.

0 commit comments

Comments
 (0)