| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
We can now import the errors into the local namespace of any module we
want (such as the unit tests) which saves having to use 40-character
identifiers to refer to the exceptions.
|
| |
|
|
|
|
|
|
|
| |
This includes tests for systems with the default splits and a system
that selects only one of the produced stratum artifacts to go into the
system artifact, since this is roughly the expected use-case for the
tiny system morphologies.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The logic is roughly the same as before, it just does it for every
artifact that a Stratum produces now.
NOTE: cmdtest tests do not pass, since they list files and artifacts
produced, which has changed since the new default splitting rules were
added. The next patch fixes this, but was kept as a separate commit for
readability.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Filenames are now matched before chunks are constructed, so
bins.create_chunk now takes a list of relative file names.
bins.chunk_contents is gone, since this is now handled by passing
source.split_rules.partition the file names.
We now don't consider it to be a problem for directories to remain in
the DESTDIR after artifacts have been removed, since we need to handle
file matches implying their parent directories, and explicit matches
against directories.
NOTE: The bins_tests were broken in this patch, and are fixed in the
next. This was done to try and aid readability of the patch series.
Full functionality is still broken until stratum splitting is fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One important change is that the builds_artifacts field of Morphologies
is not used any more, since the split rules provide this information.
Another important change is that the ArtifactResolver now only returns
aritfacts that are required to build the root artifact, rather than
every artifact in the build. Previously there was no distinction.
This is required because when artifact splitting is in effect, some
artifacts may be produced, but not depended on by anything. This confuses
the BuildCommand, which expects to be able to find a single root artifact.
NOTE: This change breaks artifact construction until "Split chunk
morphologies according to new rules" and "Split Stratum artifacts
according to new rules", since systems and strata depend on artifacts
that weren't created.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Chunk artifacts need the [(artifact_name, [regular_expression])] so that
if the default split rules change, or the blending rule changes, then
an extra version field doesn't need to be added to the cache key computer.
This is for future plans to allow the split rules to be configurable
and allow us to more easily change them.
System and Stratum artifact computations don't need this, since those
splitting rules are already expressed in the dependencies information.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
It's confusing for a chunk to specify chunks. Splits and artifacts
weren't satisfactory names either, so they're now called 'products'.
|
| |
|
|
|
|
|
|
| |
This can simplify logic in the ArtifactResolver, since it no longer needs
its own cache, and it allows you to go from a Source to its Artifacts
later.
|
|
|
|
|
| |
This it convenient, as it allows the new validation code to validate
the old morphology class during the transition period.
|
|
|
|
|
| |
It's way simpler to pick things that have no dependents than go through
all the artifacts and remove any that are depended on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 mutiple 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.
|
| |
|
| |
|
|
|
|
| |
This is useful for splitting tests
|
|
|
|
|
| |
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.
|