Local cache doesn't cleanup properly
Summary
Trying to build a project with no maximum size for the cache (hence defaults), I get:
[bschubert@me $MYELEMENT]$ cat eb0beee1-build.31021.log
[--:--:--] START MYELEMENT.bst: Build
[--:--:--] LOG MYELEMENT.bst: Build environment for element MYELEMENT.bst
HOME: /tmp
LC_ALL: C
LOGNAME: tomjon
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SHELL: /bin/sh
SOURCE_DATE_EPOCH: '1320937200'
TERM: dumb
TZ: UTC
USER: tomjon
USERNAME: tomjon
[--:--:--] BUG MYELEMENT.bst: Build
An unhandled exception occured:
Traceback (most recent call last):
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/_scheduler/jobs/job.py", line 417, in _child_action
result = self.child_process() # pylint: disable=assignment-from-no-return
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/_scheduler/jobs/elementjob.py", line 94, in child_process
return self._action_cb(self._element)
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/_scheduler/queues/buildqueue.py", line 71, in process
return element._assemble()
File "/home/1/.local/lib/python3.6/site-packages/buildstream/element.py", line 1572, in _assemble
self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # nopep8
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/element.py", line 2252, in __sandbox
allow_real_directory=not self.BST_VIRTUAL_DIRECTORY)
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/_platform/linux.py", line 69, in create_sandbox
return self._create_bwrap_sandbox(*args, **kwargs)
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/_platform/linux.py", line 130, in _create_bwrap_sandbox
return SandboxBwrap(*args, **kwargs)
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/sandbox/_sandboxbwrap.py", line 56, in __init__
super().__init__(*args, **kwargs)
File "/home/bschubert/.local/lib/python3.6/site-packages/buildstream/sandbox/sandbox.py", line 145, in __init__
os.makedirs(directory_, exist_ok=True)
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
OSError: [Errno 28] No space left on device: '/home/bschubert/.cache/buildstream/build/rmtfetickpublish-librmtfetickpublish-dev-f97w5sj6/root'
Steps to reproduce
- Create a small partition to use as your cache
- Build a project that will fill it up
What is the current bug behavior?
The cache cleaning doesn't kick in
What is the expected correct behavior?
Old entries in the cache should be removed
Relevant logs and/or screenshots
Possible fixes
Other relevant information
- BuildStream version affected: /milestone %BuildStream_v1.x