Skip to content

Expire artifacts in the remote artifact cache

James Ennis requested to merge jennis/alternative_remote_expiry into master

Fixes #136 (closed)

Supersedes !421 (closed)

Currently, the remote artifact cache is unbound and BuildStream will keep pushing artifacts to the cache regardless of its physical size.

This patch aims to automatically expire least recently pushed artifacts when the size of an incoming artifact exceeds the free disk space (of the file system which the cache is mounted on) minus some head room (2GB).

The expiry of least recently used artifacts is not currently possible with our implementation of an ostree-based cache. However, once !337 (merged) lands, this should be possible to implement.

  • Replace the _get_dir_size() function by checking the available disk space.
  • Remove LRP artifacts until there is enough room
  • Determine the size of the artifact being sent
  • Ensure that a huge artifact will not be pushed
Edited by James Ennis

Merge request reports

Loading