From 67999f0dcf715962b8f56c9bfd8c5c403213cb02 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 5 Nov 2023 10:45:08 +0200 Subject: feat(tvix/castore): extend blobstore protos for verified streaming This pdates the proto docstrings a bit, especially w.r.t. verified streaming. It also adds send_chunks, send_bao fields to StatBlobRequest (renamed from BlobMeta) Change-Id: I590cc8646d86b73bca9f38a9b6d9ea15e4df5cb6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9951 Tested-by: BuildkiteCI Reviewed-by: raitobezarius --- tvix/castore/src/blobservice/grpc.rs | 1 + tvix/castore/src/proto/grpc_blobservice_wrapper.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tvix/castore/src') diff --git a/tvix/castore/src/blobservice/grpc.rs b/tvix/castore/src/blobservice/grpc.rs index d0f619fcebcb..8d3bdfa8fa25 100644 --- a/tvix/castore/src/blobservice/grpc.rs +++ b/tvix/castore/src/blobservice/grpc.rs @@ -56,6 +56,7 @@ impl BlobService for GRPCBlobService { let resp = grpc_client .stat(proto::StatBlobRequest { digest: digest.clone().into(), + ..Default::default() }) .await; diff --git a/tvix/castore/src/proto/grpc_blobservice_wrapper.rs b/tvix/castore/src/proto/grpc_blobservice_wrapper.rs index 93db1deef69a..e7092bec1481 100644 --- a/tvix/castore/src/proto/grpc_blobservice_wrapper.rs +++ b/tvix/castore/src/proto/grpc_blobservice_wrapper.rs @@ -93,7 +93,7 @@ impl super::blob_service_server::BlobService for GRPCBlobServiceWrapper { async fn stat( &self, request: Request, - ) -> Result, Status> { + ) -> Result, Status> { let rq = request.into_inner(); let req_digest = rq .digest @@ -101,7 +101,7 @@ impl super::blob_service_server::BlobService for GRPCBlobServiceWrapper { .map_err(|_e| Status::invalid_argument("invalid digest length"))?; match self.blob_service.has(&req_digest).await { - Ok(true) => Ok(Response::new(super::BlobMeta::default())), + Ok(true) => Ok(Response::new(super::StatBlobResponse::default())), Ok(false) => Err(Status::not_found(format!("blob {} not found", &req_digest))), Err(e) => Err(e.into()), } -- cgit 1.4.1