[RFC] Morph branch-from-image
richard.maw at codethink.co.uk
Mon Jan 28 16:18:20 GMT 2013
The basic behaviour of given an image, create a System Branch petrified
at the point where it was built is well specified, but I still have some
further questions about how it should work before I get too tied to an
implementation which may turn out to be wrong.
1. How should the baserock metadata be given.
a. Path to Disk image
branch-from-image mounts it to find the metadata.
b. Path to directory
branch-from-image globs for metadata in the directory
c. List of paths to metadata files
branch-from-image leaves finding metadata up to caller
2. How is this testable.
I was thinking build a system, move the system artifact somewhere,
delete the cache and check whether the system artifact produced has
the same cache key.
3. Does the caller specify the branch's root repository and name?
The branch the System was built from and its repository is stored
in the metadata, but if it doesn't exist any more, it will need a
Specifying gives it a nice symmetry with `morph branch` which
defaults to branching from master, but can be told a different
branch instead. With it given you're saying branch as this but from
this image instead of master.
4. Should it fail to create the branch if it already exists in the
workspace, or treat it like a petrify?
5. When should it give up trying to make the branch?
a. When the commit the System was built from does not exist?
b. When the branch the System was built from does not have a similar
This could be expensive to work out and probably not worth the
c. When the branch does not exist at all?
At this point the morphologies can be regenerated from the
metadata, but it's going to be complicated.
More information about the baserock-dev