feat(castore/fs): optional refscanner for ingest
Change-Id: Ieca06de4c2e2680d89fe05a380079fafa5454837 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12529 Autosubmit: yuka <yuka@yuka.dev> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
parent
d277bd9fbf
commit
b82cacb449
5 changed files with 60 additions and 22 deletions
|
|
@ -339,10 +339,11 @@ async fn run_cli(cli: Cli) -> Result<(), Box<dyn std::error::Error + Send + Sync
|
|||
async move {
|
||||
// Ingest the given path.
|
||||
|
||||
ingest_path(
|
||||
ingest_path::<_, _, _, &[u8]>(
|
||||
blob_service,
|
||||
directory_service,
|
||||
PathBuf::from(elem.path.to_absolute_path()),
|
||||
None,
|
||||
)
|
||||
.await
|
||||
.map(|root_node| (elem, root_node))
|
||||
|
|
|
|||
|
|
@ -123,9 +123,10 @@ where
|
|||
PS: AsRef<dyn PathInfoService>,
|
||||
NS: NarCalculationService,
|
||||
{
|
||||
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))?;
|
||||
let root_node =
|
||||
ingest_path::<_, _, _, &[u8]>(blob_service, directory_service, path.as_ref(), None)
|
||||
.await
|
||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?;
|
||||
|
||||
// Ask for the NAR size and sha256
|
||||
let (nar_size, nar_sha256) = nar_calculation_service.calculate_nar(&root_node).await?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue