kolla/kolla/tests
Mark Goddard c59dc07e90 Fix --skip-existing and --skip-parents
There are currently a few corner cases with the --skip-existing and
--skip-parents flags. Examples:

1. kolla-build --type source --skip-parents monasca-grafana

This does not try to build the monasca-grafana image. This appears to be
an issue when the image is a grandchild.

2. kolla-build --type source --skip-parents

This will build all images. Expect it to skip parents.

3. kolla-build --type source --skip-existing

This will build all images. Expect it to skip existing images.

The filter_images method does quite a lot, including handling
whether images are buildable, regex/profile matching, and which images
to skip. The matching and skipping parts are done in a single pass,
which can lead to some weird effects due to dependencies between the
images and their statuses. Also, skipping is only currently applied when
there is a regex/profile filter.

This change splits out the matching and skipping into two separate
passes. In the first pass, we mark all buildable images that match the
filter as matched. In the second, we iterate over matched images,
applying the skip existing and skip parents rules.

Change-Id: I2f895aea0cc59d808129e9fc636af0890196af33
Closes-Bug: #1867614
Related-Bug: #1810979
(cherry picked from commit dfddcce3a5)
2020-04-04 18:53:49 +00:00
..
common add unittest code base 2016-01-18 11:42:00 +00:00
docker Fix image plugin functionality for oslo.config 2016-02-12 06:00:20 +00:00
etc Move to opendev 2019-04-24 15:22:57 +08:00
__init__.py add unittest code base 2016-01-18 11:42:00 +00:00
base.py Make build.py importable lib 2016-06-07 16:40:16 +00:00
test_build.py Fix --skip-existing and --skip-parents 2020-04-04 18:53:49 +00:00
test_hacking.py Add HACKING.rst and hacking test case. 2016-11-24 15:55:43 +08:00
test_methods.py always update APT lists when install packages 2017-05-08 14:31:33 +02:00