| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This introduces a new artifactsplitrule module, which tries to provide a
nice abstraction over matching a sequence of things to a bunch of
outputs, to be used by both chunks splitting, for separating files out
into chunk artifacts, the stratum splitting, where chunks are
aggregated into stratum artifacts, and systems selecting the right
strata to go into the artifact.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think that it's confusing for both strata and chunk morphologies to
have a 'chunks' field, with the former listing sources and the latter
listing rules for splitting this source into artifacts.
The design for splitting strata has roughly the same idea, but operating
on chunk artifact names, rather than file names, so a name that can be
used for both was chosen.
Splits and artifacts weren't satisfactory names, so they're now called
'products'.
It was decided to break backwards compatibility of chunk morphologies
being able to specify 'chunks', since the format has changed, so extra
code would be required to translate the format, and the only users of
the 'chunks' field was the test suite, since there was no way to select
from the system, which chunk artifacts were included.
|
| |
|
|
|
|
|
|
|
|
| |
This simplifies logic for the ArtifactResolver, since it doesn't need to
have its own cache of (source, artifact_name) -> artifact and the
artifacts a source produces can be iterated directly with the artifacts
attribute, rather than having to iterate over the names and look up the
artifact object.
|
|
|
|
|
| |
This it convenient, as it allows the new validation code to validate
the old morphology class during the transition period.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When you attempt to build a stratum or chunk, the ArtifactResolver can
return multiple root artifacts, since the root source produces multiple
artifacts.
Rather than having the BuildCommand complain that there's multiple root
artifacts, it now validates all the produced artifacts too, since that
will validate the kinds of artifacts produced, and give a more useful
error message, that you're trying to build a stratum or chunk directly.
If all the produced artifacts validate, then an exception is raised to
signal that it got multiple artifacts, when it only expected one.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Later validation work causes the morphologies to be validated, when they
weren't previously. This would cause the test suite to not pass, since
the morphologies defined in the tests are malformed.
One common problem was tests that, instead of a name field, had the name
of the morpholgy in a field called "chunk".
There were a few cases of new fields being needed, since the tests were
written before they became mandatory.
The most interesting failure was a Source being created, which instead
of being passed a morphology object, was passed a string.
|
| |
|
|
|
|
|
|
|
| |
It's useful for the splitting tests that will be implemented later, for
there to be files that are representative of the files that would be on
a common root filesystem, so the match rules can be tested by the right
chunk artifacts containing the right files.
|
|
|
|
|
| |
morph build the system... doesn't need the repository to be specified,
just the branch; morph is able to work it out for itself.
|
|\
| |
| |
| |
| | |
Reviewed-by: Dan Firth
Reviewed-by: Richard Maw
|
| |
| |
| |
| | |
Feedback by Richard Maw.
|
|/ |
|
|\ |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| | |
Reviewed-by: Richard Maw
|
| | |
|
| | |
|
|/ |
|
|\ |
|
|/
|
|
|
|
| |
Previous fix only quoted URLs, which fixed petrify --no-git-update, but not the
whole problem, quoting ref and filename prevents other problems that may be
caused by non URL friendly characters.
|
|\ |
|
|/ |
|
|\ |
|
|/ |
|
|\
| |
| |
| | |
'remotes/origin/baserock/richardmaw/S9475/refactor-build-cmd-v3'
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It now does not push branches as this is not necessary to locate the
artifact.
It still makes temporary build branches, since it is assumed that if
you have changes in your workspace, it's preferable for the deploy to
fail, rather than think you've deployed something you haven't.
|
| |
| |
| |
| |
| | |
The new build code uses `git update-index --add`, which means it can use
morphologies that haven't previously been added.
|
| |
| |
| |
| | |
The old build is still around for comparison.
|
| |
| |
| |
| |
| |
| | |
This uses all the new APIs, so the code is shared across morphlib and
unit tested rather than everything being in one massive plugin that is
only black-box tested.
|
| |
| |
| |
| |
| |
| |
| | |
This is an abstraction on top of SystemBranchDirectories, providing the
ability to add uncommitted changes to the temporary build branch, push
temporary build branches and retrieve the correct repository URI and ref
to build the system.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now it will optionally clean up on success based on a constructor
parameter.
It can be later cleaned up explicitly by calling close().
It is called close, rather than something more obvious, like cleanup(),
since it means the manager can be re-used with contextlib.closing().
This now means that using the Managers without a context manager is less
ugly, since you can explicitly call .close() in a finally block.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was previously a private method of the branch and merge
plugin, but it's useful to other plugins, so has been moved to the
SystemBranchDirectory class, where everything else can get to it.
It has an unpleasant amount of coupling to other classes, but in a *good*
object oriented design it would either be a tiny module on its own,
or not exist and leave all its users to re-implement the same logic
multiple ways, so we've opted for a less clean, but more useful design.
It is left un-covered by the unit tests, since it requires a great deal
of instrumentation to test, at which point it may be best to leave it
to integration tests.
|
| |
| |
| |
| |
| |
| | |
It doesn't make sense to be able to specify an architecture from the
IMPLEMENTS name, since you either need your architecture for something
to build, or testarch for something that consistently doesn't build.
|
| |
| |
| |
| | |
It saves some boilerplate.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bootstrap chunks don't make it into the final system, so there needs to
be an extra check for empty systems after the sources have been collected.
This was complicated slightly by the fact that if you try to build a chunk
directly you will have no strata in your sources, hence no non-bootstrap
chunks, but validation for having been told to build a chunk is best
handled later.
This amends the old yarns that depended on building a bootstrap chunk
and adds a new one that explicitly builds a system with bootstrap
chunks.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It doesn't currently make sense to build a system which contains no
strata. We may later add other fields, such as initramfs to contribute
to the system's artifact, but until then it's another bug to trip over.
This uses collections.Sequence for checking the type of the systems entry
in the morphology as a style choice, though it allows more flexibility
if the types in the parsed morphology change.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This was omittted from the MorphologyLoader due to cluster morphologies
being added at about the same time.
This bug escaped detection since the MorphologyLoader was not required
to deploy. It soon will be.
|
| |
| |
| |
| |
| | |
Dedicated exceptions allow more fine-grained exception catching and can
have extra data.
|
|/
|
|
|
| |
Set -e meant that the stderr could never be re-output, catching the
return code and re-outputting was not sufficient.
|
|\ |
|
| |\
| | |
| | |
| | | |
Reviewed-by: Lars Wirzenius
|
| |/ |
|
|\ \
| |/
|/|
| | |
'remotes/origin/baserock/ps/show-stratum-versions-in-build'
|
| | |
|