pipeline: checkpoint assemblers just like stages
Change the assembler-commit to be conditional on checkpoints, just like we already do for stages. This means, assembler output is not automatically committed, but only if you requested so via a checkpoint. With this in place we can start sharing caches in osbuild-composer. The only thing in the cache will be sources as well as checkpointed stages. We can start checkpointing known pipelines and thus make use of the cache. Furthermore, we can cache sources, as long as we do not fetch an unbound set of RPMs. However, our RPM set is currently static, so this should not be an issue. Nevertheless, it is up to Composer to decide when to enable the cache.
This commit is contained in:
parent
9c982dc147
commit
867adc1596
2 changed files with 11 additions and 1 deletions
|
|
@ -30,9 +30,17 @@ def mark_checkpoints(pipeline, checkpoints):
|
|||
stage.checkpoint = True
|
||||
points.remove(c)
|
||||
|
||||
def mark_assembler(assembler):
|
||||
c = assembler.id
|
||||
if c in points:
|
||||
assembler.checkpoint = True
|
||||
points.remove(c)
|
||||
|
||||
def mark_pipeline(pl):
|
||||
for stage in pl.stages:
|
||||
mark_stage(stage)
|
||||
if pl.assembler:
|
||||
mark_assembler(pl.assembler)
|
||||
if pl.build:
|
||||
mark_pipeline(pl.build)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue