[PATCH 00/11] Per source building Episode II - Per source building strikes back

Sam Thursfield sam.thursfield at codethink.co.uk
Fri Sep 19 14:56:47 BST 2014


On 17/09/14 18:13, Richard Maw wrote:
> There's 5 patches labelled FIXUP. These ought to be squashed into the
> earlier patches to keep the history in a bisectable state, but have been
> left un-merged-in to make it easier to read.
>
> It needs all the help it can get, with a significant amount of code
> changed, even ignoring the show-dependencies stdout change.
>
> Richard Maw (11):
>    Create multiple sources per stratum morphology
>    FIXUP: Fix up unit tests from change allowing multiple sources
>    FIXUP: Fix show-dependencies output to include source names
>    Move dependencies and cache keys to Sources
>    FIXUP: Add compatibility methods to Artifact for fields that moved to
>      Source
>    Build per-source rather than per-artifact
>    FIXUP: Cmdtest artifact listings after building per-source
>    FIXUP: Fix unit tests after changing to per-source builds
>    Fix show-dependencies plugin to use source deps.
>    Remove get_dependency_prefix_set
>    Remove Artifact compatibility methods
>
>   morphlib/app.py                                    |    8 +-
>   morphlib/artifact.py                               |   39 +-
>   morphlib/artifact_tests.py                         |   48 +-
>   morphlib/artifactresolver.py                       |  101 +-
>   morphlib/artifactresolver_tests.py                 |  315 +-
>   morphlib/buildcommand.py                           |  182 +-
>   morphlib/builder2.py                               |  240 +-
>   morphlib/builder2_tests.py                         |   32 +-
>   morphlib/cachekeycomputer.py                       |   55 +-
>   morphlib/cachekeycomputer_tests.py                 |   63 +-
>   morphlib/localartifactcache_tests.py               |   20 +-
>   morphlib/plugins/cross-bootstrap_plugin.py         |  121 +-
>   morphlib/plugins/show_dependencies_plugin.py       |    4 +-
>   morphlib/remoteartifactcache.py                    |    4 +-
>   morphlib/remoteartifactcache_tests.py              |    6 +-
>   morphlib/source.py                                 |   73 +-
>   morphlib/source_tests.py                           |   11 +-
>   morphlib/sourcepool.py                             |   13 +-
>   morphlib/sourcepool_tests.py                       |   12 +-
>   morphlib/stagingarea.py                            |    4 +-
>   morphlib/stagingarea_tests.py                      |    1 +
>   ...run-in-artifact-with-different-artifacts.stdout |    2 +-
>   tests.as-root/tarball-image-is-sensible.stdout     |    2 +-
>   tests/show-dependencies.stdout                     | 3358 ++++++++++----------
>   24 files changed, 2270 insertions(+), 2444 deletions(-)
>

I found that ./check failed:

Statements missed by per-module tests:
   Module          Missed statements
   morphology.py   51

It's trivial to fix:

diff --git a/morphlib/morphology.py b/morphlib/morphology.py
index 9bd9bb5..a94dd6e 100644
--- a/morphlib/morphology.py
+++ b/morphlib/morphology.py
@@ -47,5 +47,5 @@ class Morphology(UserDict.IterableUserDict):
      def needs_artifact_metadata_cached(self): # pragma: no cover
          return self.get('kind') == 'stratum'

-    def __hash__(self):
+    def __hash__(self):  # pragma: no cover
          return id(self)


It's really cool that this branch gives the correct number of chunks 
being built in Morph's status output!

One small issue is that there are more 'Stratum xxx version is yyy' 
messages now. Those messages aren't needed any more because all strata 
come from the same version anyway (maybe we could say "definitions 
version is yyy" if the message is still useful). That can be fixed 
separately to this patch series.

I've build a system with this, I'm not sure there's more testing needed 
than that :) +1 to merge


-- 
Sam Thursfield, Codethink Ltd.
Office telephone: +44 161 236 5575



More information about the baserock-dev mailing list