Skip to content

Commit

Permalink
fix: increase tar file limit
Browse files Browse the repository at this point in the history
including node_modules in tar blob causes
file counts to be consistently above 10k
eg:
- gameplan: 25,269
- hrms: 32,369
  • Loading branch information
18alantom committed Feb 1, 2024
1 parent 436b3c5 commit d8ce1b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ def get_cached(self) -> bool:

click.secho(f"Getting {self.app_name} from cache", fg="yellow")
with tarfile.open(cache_path, mode) as tar:
extraction_filter = get_app_cache_extract_filter(count_threshold=150_000)
try:
tar.extractall(app_path.parent, filter=get_app_cache_extract_filter())
tar.extractall(app_path.parent, filter=extraction_filter)
except Exception:
logger.exception(f"Cache extraction failed for {self.app_name}")
shutil.rmtree(app_path)
Expand Down

0 comments on commit d8ce1b3

Please sign in to comment.