chore(tvix): upgrade to tonic 0.12 / hyper 1.0
Change-Id: Idd8ce48869ddd869d51a10959b920f1290a8a9b3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11991 Autosubmit: yuka <yuka@yuka.dev> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
1515a970be
commit
ca8e2b9fbf
15 changed files with 1840 additions and 751 deletions
|
@ -15,17 +15,17 @@ digest = "0.10.7"
|
|||
fastcdc = { version = "3.1.0", features = ["tokio"] }
|
||||
futures = "0.3.30"
|
||||
lazy_static = "1.4.0"
|
||||
object_store = { version = "0.9.1", features = ["http"] }
|
||||
object_store = { version = "0.10.1", features = ["http"] }
|
||||
parking_lot = "0.12.1"
|
||||
pin-project-lite = "0.2.13"
|
||||
prost = "0.12.1"
|
||||
prost = "0.13.1"
|
||||
sled = { version = "0.34.7" }
|
||||
thiserror = "1.0.38"
|
||||
tokio-stream = { version = "0.1.14", features = ["fs", "net"] }
|
||||
tokio-util = { version = "0.7.9", features = ["io", "io-util", "codec"] }
|
||||
tokio-tar = "0.3.1"
|
||||
tokio = { version = "1.32.0", features = ["fs", "macros", "net", "rt", "rt-multi-thread", "signal"] }
|
||||
tonic = "0.11.0"
|
||||
tonic = "0.12.0"
|
||||
tower = "0.4.13"
|
||||
tracing = "0.1.37"
|
||||
tracing-indicatif = "0.3.6"
|
||||
|
@ -39,6 +39,7 @@ serde_qs = "0.12.0"
|
|||
petgraph = "0.6.4"
|
||||
erased-serde = "0.4.5"
|
||||
serde_tagged = "0.3.0"
|
||||
hyper-util = "0.1.6"
|
||||
|
||||
[dependencies.bigtable_rs]
|
||||
optional = true
|
||||
|
@ -58,7 +59,7 @@ optional = true
|
|||
|
||||
[dependencies.tonic-reflection]
|
||||
optional = true
|
||||
version = "0.11.0"
|
||||
version = "0.12.0"
|
||||
|
||||
[dependencies.vhost]
|
||||
optional = true
|
||||
|
@ -85,8 +86,8 @@ optional = true
|
|||
version = "0.2.1"
|
||||
|
||||
[build-dependencies]
|
||||
prost-build = "0.12.1"
|
||||
tonic-build = "0.11.0"
|
||||
prost-build = "0.13.1"
|
||||
tonic-build = "0.12.0"
|
||||
|
||||
[dev-dependencies]
|
||||
async-process = "2.1.0"
|
||||
|
|
|
@ -2,6 +2,7 @@ use crate::blobservice::{BlobService, MemoryBlobService};
|
|||
use crate::proto::blob_service_client::BlobServiceClient;
|
||||
use crate::proto::GRPCBlobServiceWrapper;
|
||||
use crate::{blobservice::GRPCBlobService, proto::blob_service_server::BlobServiceServer};
|
||||
use hyper_util::rt::TokioIo;
|
||||
use tonic::transport::{Endpoint, Server, Uri};
|
||||
|
||||
/// Constructs and returns a gRPC BlobService.
|
||||
|
@ -33,7 +34,7 @@ pub async fn make_grpc_blob_service_client() -> Box<dyn BlobService> {
|
|||
.unwrap()
|
||||
.connect_with_connector(tower::service_fn(move |_: Uri| {
|
||||
let right = maybe_right.take().unwrap();
|
||||
async move { Ok::<_, std::io::Error>(right) }
|
||||
async move { Ok::<_, std::io::Error>(TokioIo::new(right)) }
|
||||
}))
|
||||
.await
|
||||
.unwrap(),
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::{
|
|||
proto::directory_service_server::DirectoryServiceServer,
|
||||
};
|
||||
|
||||
use hyper_util::rt::TokioIo;
|
||||
use tonic::transport::{Endpoint, Server, Uri};
|
||||
|
||||
/// Constructs and returns a gRPC DirectoryService.
|
||||
|
@ -37,7 +38,7 @@ pub async fn make_grpc_directory_service_client() -> Box<dyn DirectoryService> {
|
|||
.unwrap()
|
||||
.connect_with_connector(tower::service_fn(move |_: Uri| {
|
||||
let right = maybe_right.take().unwrap();
|
||||
async move { Ok::<_, std::io::Error>(right) }
|
||||
async move { Ok::<_, std::io::Error>(TokioIo::new(right)) }
|
||||
}))
|
||||
.await
|
||||
.unwrap(),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use hyper_util::rt::TokioIo;
|
||||
use tokio::net::UnixStream;
|
||||
use tonic::transport::{Channel, Endpoint};
|
||||
|
||||
|
@ -25,7 +26,10 @@ pub async fn channel_from_url(url: &url::Url) -> Result<Channel, self::Error> {
|
|||
|
||||
let connector = tower::service_fn({
|
||||
let url = url.clone();
|
||||
move |_: tonic::transport::Uri| UnixStream::connect(url.path().to_string().clone())
|
||||
move |_: tonic::transport::Uri| {
|
||||
let unix = UnixStream::connect(url.path().to_string().clone());
|
||||
async move { Ok::<_, std::io::Error>(TokioIo::new(unix.await?)) }
|
||||
}
|
||||
});
|
||||
|
||||
// the URL doesn't matter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue