Skip to content

Commit

Permalink
feat: skip small files (<5KB)
Browse files Browse the repository at this point in the history
  • Loading branch information
hraban committed May 22, 2024
1 parent 07b8fc3 commit ae53105
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions magic-nix-cache/src/gha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ async fn upload_path(
) -> Result<()> {
let path_info = store.query_path_info(path.clone()).await?;

if path_info.nar_size < 5000 {
tracing::debug!(
"Skipping small file '{}' ({}b)",
nar_path,
path_info.nar_size
);
return Ok(());
}

// Upload the NAR.
let nar_path = format!("{}.nar.zstd", path_info.nar_hash.to_base32());

Expand Down

0 comments on commit ae53105

Please sign in to comment.