Skip to content

gracefully handle missing files/directories in cache storage #6147

@paveldikov

Description

@paveldikov

Not sure if this is a common pattern, but we like to store the cache directory on /var/tmp as the usual home directory may be on a network share (and extremely slow I/O as a result).

This works great for us, but it also happens that /var/tmp is affected by a periodic cleanup process that deletes old files/directories. Once this happens, we get a bunch of error messages along the lines of:

  Caused by: Failed to install: packaging-24.1-py3-none-any.http.whl (packaging==24.1)
  Caused by: failed to read directory `/var/tmp/pavel/.cache/uv/archive-v0/REDACTED`
  Caused by: No such file or directory (os error 2)

rm -rf'ing the cache dir (or uv cache clean -- but not uv cache prune) seems to work around this problem fine, but it's quite a severe thing to do.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions