diff --git a/Cargo.lock b/Cargo.lock index fde54ed09bcad6e1a4bea4921dd9a1ca60e54c51..f09c31e479ff1890026cd728af00c918b8be29f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -340,7 +340,7 @@ dependencies = [ "arrow-schema 52.2.0", "arrow-select 52.2.0", "atoi", - "base64 0.22.1", + "base64", "chrono", "comfy-table", "half", @@ -361,7 +361,7 @@ dependencies = [ "arrow-schema 53.0.0", "arrow-select 53.0.0", "atoi", - "base64 0.22.1", + "base64", "chrono", "half", "lexical-core", @@ -690,6 +690,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" @@ -812,18 +818,17 @@ dependencies = [ [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", "http", "http-body", - "hyper", + "http-body-util", "itoa", "matchit", "memchr", @@ -832,7 +837,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -840,17 +845,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", "http", "http-body", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -870,12 +878,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -2001,15 +2003,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.26" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", "indexmap 2.1.0", "slab", @@ -2076,9 +2078,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -2087,12 +2089,24 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", "pin-project-lite", ] @@ -2116,13 +2130,12 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", "h2", "http", @@ -2131,23 +2144,42 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ "hyper", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -2920,7 +2952,7 @@ dependencies = [ "arrow-ipc 52.2.0", "arrow-schema 52.2.0", "arrow-select 52.2.0", - "base64 0.22.1", + "base64", "bytes", "chrono", "half", @@ -2949,7 +2981,7 @@ dependencies = [ "arrow-ipc 53.0.0", "arrow-schema 53.0.0", "arrow-select 53.0.0", - "base64 0.22.1", + "base64", "bytes", "chrono", "half", @@ -3243,6 +3275,16 @@ dependencies = [ "prost-derive 0.12.6", ] +[[package]] +name = "prost" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2ecbe40f08db5c006b5764a2645f7f3f141ce756412ac9e1dd6087e6d32995" +dependencies = [ + "bytes", + "prost-derive 0.13.2", +] + [[package]] name = "prost-build" version = "0.12.6" @@ -3258,7 +3300,7 @@ dependencies = [ "petgraph", "prettyplease", "prost 0.12.6", - "prost-types", + "prost-types 0.12.6", "regex", "syn 2.0.47", "tempfile", @@ -3290,6 +3332,19 @@ dependencies = [ "syn 2.0.47", ] +[[package]] +name = "prost-derive" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.47", +] + [[package]] name = "prost-types" version = "0.12.6" @@ -3299,6 +3354,15 @@ dependencies = [ "prost 0.12.6", ] +[[package]] +name = "prost-types" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60caa6738c7369b940c3d49246a8d1749323674c65cb13010134f5c9bad5b519" +dependencies = [ + "prost 0.13.2", +] + [[package]] name = "pthash" version = "0.4.0" @@ -3793,7 +3857,7 @@ dependencies = [ [[package]] name = "swh-graph" -version = "5.1.1" +version = "6.0.0" dependencies = [ "anyhow", "ar_row 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3843,7 +3907,7 @@ dependencies = [ [[package]] name = "swh-graph-grpc-server" -version = "5.1.1" +version = "6.0.0" dependencies = [ "anyhow", "async-scoped", @@ -3854,8 +3918,8 @@ dependencies = [ "itertools 0.11.0", "java-properties 1.4.1", "log", - "prost 0.12.6", - "prost-types", + "prost 0.13.2", + "prost-types 0.13.2", "serde", "serde_derive", "serde_json", @@ -3870,7 +3934,7 @@ dependencies = [ [[package]] name = "swh_graph_contributions" -version = "5.1.1" +version = "6.0.0" dependencies = [ "anyhow", "chrono", @@ -3889,7 +3953,7 @@ dependencies = [ [[package]] name = "swh_graph_file_names" -version = "5.1.1" +version = "6.0.0" dependencies = [ "anyhow", "clap", @@ -3907,7 +3971,7 @@ dependencies = [ [[package]] name = "swh_graph_provenance" -version = "5.1.1" +version = "6.0.0" dependencies = [ "anyhow", "ar_row 1.0.0 (git+https://gitlab.softwareheritage.org/swh/devel/ar_row-rs.git?rev=02413b8a74b2fafb4ecc811513b1040dc949c656)", @@ -3938,7 +4002,7 @@ dependencies = [ [[package]] name = "swh_graph_pyo3" -version = "5.1.1" +version = "6.0.0" dependencies = [ "pyo3", "swh-graph", @@ -3946,7 +4010,7 @@ dependencies = [ [[package]] name = "swh_graph_topology" -version = "5.1.1" +version = "6.0.0" dependencies = [ "anyhow", "arrow 52.2.0", @@ -3991,6 +4055,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "sysctl" version = "0.5.5" @@ -4181,16 +4251,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.2.0" @@ -4229,23 +4289,26 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64", "bytes", "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost 0.12.6", + "prost 0.13.2", + "socket2", "tokio", "tokio-stream", "tower", @@ -4269,9 +4332,9 @@ dependencies = [ [[package]] name = "tonic-middleware" -version = "0.1.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d34dab0f18194ddb9164685a3d8cf777ff35042752aba2be208b1384d7a304" +checksum = "b4a200bd1d9bb907c62531e440a764072fc00c4e9e24b4904e77a066edb54a3f" dependencies = [ "async-trait", "futures-util", @@ -4281,12 +4344,12 @@ dependencies = [ [[package]] name = "tonic-reflection" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548c227bd5c0fae5925812c4ec6c66ffcfced23ea370cb823f4d18f0fc1cb6a7" +checksum = "7b56b874eedb04f89907573b408eab1e87c1c1dce43aac6ad63742f57faa99ff" dependencies = [ - "prost 0.12.6", - "prost-types", + "prost 0.13.2", + "prost-types 0.13.2", "tokio", "tokio-stream", "tonic", diff --git a/grpc-server/Cargo.toml b/grpc-server/Cargo.toml index adedf1fff4e8bea28637a3940322ea576b352013..e74a021b96d035a888a0787c57ce465d5b2cef4e 100644 --- a/grpc-server/Cargo.toml +++ b/grpc-server/Cargo.toml @@ -21,11 +21,11 @@ env_logger.workspace = true log.workspace = true # gRPC -prost = "0.12" -prost-types = "0.12" -tonic = "0.11.0" -tonic-reflection = "0.11.0" -tonic-middleware = "0.1.4" +prost = "0.13" +prost-types = "0.13" +tonic = "0.12.2" +tonic-reflection = "0.12.2" +tonic-middleware = "0.2.1" # serde serde_json = "1.0" diff --git a/grpc-server/src/lib.rs b/grpc-server/src/lib.rs index 4462fc6e859e9804323f099ac1b81c4d2e971de3..5896b6ac0733c04cd24040f986820318c90fa094 100644 --- a/grpc-server/src/lib.rs +++ b/grpc-server/src/lib.rs @@ -12,7 +12,7 @@ use std::sync::Arc; use tokio::time::Instant; use tokio_stream::wrappers::ReceiverStream; use tonic::body::BoxBody; -use tonic::transport::{Body, Server}; +use tonic::transport::Server; use tonic::{Request, Response}; use tonic_middleware::{Middleware, MiddlewareFor, ServiceBound}; @@ -294,10 +294,15 @@ pub async fn serve<G: SwhFullGraph + Sync + Send + 'static>( )) .add_service( tonic_reflection::server::Builder::configure() - //.register_encoded_file_descriptor_set(tonic_reflection::pb::FILE_DESCRIPTOR_SET) .register_encoded_file_descriptor_set(proto::FILE_DESCRIPTOR_SET) - .build() - .expect("Could not load reflection service"), + .build_v1() + .expect("Could not load v1 reflection service"), + ) + .add_service( + tonic_reflection::server::Builder::configure() + .register_encoded_file_descriptor_set(proto::FILE_DESCRIPTOR_SET) + .build_v1alpha() + .expect("Could not load v1alpha reflection service"), ) .serve(bind_addr) .await?; @@ -316,7 +321,7 @@ where { async fn call( &self, - req: tonic::codegen::http::Request<Body>, + req: tonic::codegen::http::Request<BoxBody>, mut service: S, ) -> Result<tonic::codegen::http::Response<BoxBody>, S::Error> { if log::log_enabled!(log::Level::Info) {