buildbuddy icon indicating copy to clipboard operation
buildbuddy copied to clipboard

Prevent delete_build_root_on_startup from wiping image cache

Open bduffany opened this issue 4 months ago • 0 comments

Running the executor with --executor.delete_build_root_on_startup deletes the contents of --executor.build_root_directory. This is where temporary files are stored (action workspaces, firecracker chroot dirs, etc.).

Unfortunately, this is also where cached firecracker / OCI images are stored (under an executor subdir).

This PR adds a temporary fix for this issue which is to only delete the executor directory if a separate flag executor.delete_image_cache_on_startup is set.

Eventually, we should move persistent files and temporary files to separate directories. Ideally, cached artifacts would be somehow stored in filecache - this is a little tricky though because OCI image layers in particular are represented as extracted directories, not single files.

bduffany avatar Oct 17 '24 16:10 bduffany