about summary refs log tree commit diff
path: root/tvix/castore/src/import/error.rs
diff options
context:
space:
mode:
authorConnor Brewster <cbrewster@hey.com>2024-04-20T14·19-0500
committerclbot <clbot@tvl.fyi>2024-04-23T15·31+0000
commitfa69becf4d723c1549d8252eeabeb256423dbc19 (patch)
treed150d855b9ba5c276cf87d400fc6810315ebb22b /tvix/castore/src/import/error.rs
parent49b63fceeecca9192d2c418313b550e49ea6b365 (diff)
refactor(tvix/castore): switch to `ingest_entries` for tarball ingestion r/8000
With `ingest_entries` being more generalized, we can now use it for
ingesting the directory entries generated from tarballs.

Change-Id: Ie1f7a915c456045762e05fcc9af45771f121eb43
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11489
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/src/import/error.rs')
-rw-r--r--tvix/castore/src/import/error.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/tvix/castore/src/import/error.rs b/tvix/castore/src/import/error.rs
index 18c71aa235b8..8cd4f95ffb52 100644
--- a/tvix/castore/src/import/error.rs
+++ b/tvix/castore/src/import/error.rs
@@ -1,6 +1,6 @@
 use std::{fs::FileType, path::PathBuf};
 
-use crate::{proto::ValidateDirectoryError, Error as CastoreError};
+use crate::Error as CastoreError;
 
 #[derive(Debug, thiserror::Error)]
 pub enum Error {
@@ -25,11 +25,14 @@ pub enum Error {
     #[error("unsupported file {0} type: {1:?}")]
     UnsupportedFileType(PathBuf, FileType),
 
-    #[error("invalid directory contents {0}: {1}")]
-    InvalidDirectory(PathBuf, ValidateDirectoryError),
-
     #[error("unsupported tar entry {0} type: {1:?}")]
     UnsupportedTarEntry(PathBuf, tokio_tar::EntryType),
+
+    #[error("symlink missing target {0}")]
+    MissingSymlinkTarget(PathBuf),
+
+    #[error("unexpected number of top level directory entries")]
+    UnexpectedNumberOfTopLevelEntries,
 }
 
 impl From<CastoreError> for Error {