pipeline: identify tree objects during build

Every time a stage has been successfully built, the contents of
the tree now corresponds to the stage and can thus be identified
via the id of the stage.
When the tree is being written to, i.e. on consecutive attempts
of stage builds, the `id` of the tree object will automatically
be reset.
This commit is contained in:
Christian Kellner 2020-12-17 17:51:27 +01:00 committed by Tom Gundersen
parent f7bcec60f4
commit b039761544

View file

@ -249,6 +249,10 @@ class Pipeline:
results["success"] = False
return results, None, None
# The content of the tree now corresponds to the stage that
# was build and this can can be identified via the id of it
tree.id = stage.id
if stage.checkpoint:
object_store.commit(tree, stage.id)