debian-forge/osbuild
Christian Kellner ae0680da11 osbuid: integrate FsCache into ObjectStore
Integrate the recently added file system cache `FsCache` into our
object store `ObjectStore`. NB: This changes the semantics of it:
previously a call to `ObjectStore.commit` resulted in the object
being in the cache (i/o errors aside). But `FsCache.store`, which
is now the backing store for objects, will only commit objects if
there is enough space left. Thus we cannot rely that objects are
present for reading after a call to `FsCache.store`. To cope with
this we now always copy the object into the cache, even for cases
where we previously moved it: for the case where commit is called
with `object_id` matching `Object.id`, which is the case for when
`commit` is called for last stage in the pipeline. We could keep
this optimization but then we would have to special case it and
not call `commit` for these cases but only after we exported all
objects; or in other words, after we are sure we will never read
from any committed object again. The extra complexity seems not
worth it for the little gain of the optimization.
Convert all the tests for the new semantic and also remove a lot
of them that make no sense under this new paradigm.

Add a new command line option `--cache-max-size` which will set
the maximum size of the cache, if specified.
2022-12-09 12:03:40 +01:00
..
formats format: read metadata from object not result 2022-12-09 12:03:40 +01:00
util util: add helper to parse size strings 2022-12-09 12:03:40 +01:00
__init__.py Post release version bump 2022-12-07 08:15:17 +00:00
__main__.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
api.py pipeline,api: write metadata directly 2022-12-09 12:03:40 +01:00
buildroot.py buildroot: explicitly bind mount runner 2022-10-11 12:49:16 +02:00
devices.py devices: new helper to ensure a device node exists 2022-11-22 18:28:38 +01:00
host.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
inputs.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
loop.py loop: silence W0201 (attribute outside init) in set_status 2022-05-06 17:33:23 +02:00
main_cli.py osbuid: integrate FsCache into ObjectStore 2022-12-09 12:03:40 +01:00
meta.py meta: ensure we have an absolute path for Index 2022-10-11 12:49:16 +02:00
monitor.py monitor/log: show build root and runner 2022-10-11 12:49:16 +02:00
mounts.py mounts: use the options object for mountopts 2022-11-30 14:21:10 +01:00
objectstore.py osbuid: integrate FsCache into ObjectStore 2022-12-09 12:03:40 +01:00
pipeline.py pipeline,api: write metadata directly 2022-12-09 12:03:40 +01:00
remoteloop.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
sources.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00