From c9d3946cb583631bc2ca4a1343f054f7ee64a626 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 30 Apr 2024 18:48:12 +0300 Subject: refactor(tvix/castore/import): restructure error types Have ingest_entries return an Error type with only three kinds: - Error while uploading a specific Directory - Error while finalizing the directory upload - Error from the producer Move all ingestion method-specific errors to the individual implementations. Change-Id: I2a015cb7ebc96d084cbe2b809f40d1b53a15daf3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11557 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: Connor Brewster --- tvix/store/src/import.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tvix/store') diff --git a/tvix/store/src/import.rs b/tvix/store/src/import.rs index 7b6aeb824ea6..88cebc8be613 100644 --- a/tvix/store/src/import.rs +++ b/tvix/store/src/import.rs @@ -117,7 +117,9 @@ where DS: AsRef, PS: AsRef, { - let root_node = ingest_path(blob_service, directory_service, path.as_ref()).await?; + let root_node = ingest_path(blob_service, directory_service, path.as_ref()) + .await + .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; // Ask the PathInfoService for the NAR size and sha256 let (nar_size, nar_sha256) = path_info_service.as_ref().calculate_nar(&root_node).await?; -- cgit 1.4.1