osbuild: flatten the pipeline
Instead of having build pipelines nested within the pipeline it is the build pipeline for, the nested structure is transferred into a flat list of pipelines. As a result the recursion is gone and all the pipelines and trees are build one after the other. This is now possible since floating objects are kept alive by the store itself and all trees that are being built are transparently via them. The immediate result dictionary changed accordingly. To keep the JSON output of osbuild the same, the result is now routed through a format specific converter. Additionally, the v1 format module gained a function to retrieve the global tree_id and output_id. With the new models those global ids will go away eventually and thus need to go through the format specific code.
This commit is contained in:
parent
54761e8a13
commit
262877091f
5 changed files with 75 additions and 42 deletions
|
|
@ -355,7 +355,8 @@ class OSBuild(contextlib.AbstractContextManager):
|
|||
manifest_json = json.loads(manifest_data)
|
||||
|
||||
manifest = fmt.load(manifest_json)
|
||||
return manifest.pipeline.tree_id
|
||||
tree_id, _ = fmt.get_ids(manifest)
|
||||
return tree_id
|
||||
|
||||
@contextlib.contextmanager
|
||||
def map_object(self, obj):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue