Try reuse old gather_phase even if pkgset_koji_builds changed.

The pkgset_koji_builds influences the gather phase, but the
change itself is not a reason to not reuse old gather phase. if
new pkgset_koji_builds value leads to significant change in input
package set, we will find that later in this function when comparing
old and new package set.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
Jan Kaluza 2020-11-10 12:52:02 +01:00
parent 94bc5e286d
commit bb8cd030ec
2 changed files with 9 additions and 3 deletions

View File

@ -253,8 +253,14 @@ def reuse_old_gather_packages(compose, arch, variant, package_sets):
continue
# Skip checking for frequently changing configuration options which do *not*
# influence Gather phase.
config_whitelist = ["product_id"]
# influence Gather phase:
# - product_id - Changes with every compose.
# - pkgset_koji_builds - This influences the gather phase, but the
# change itself is not a reason to not reuse old gather phase. if
# new pkgset_koji_builds value leads to significant change in input
# package set, we will find that later in this function when comparing
# old and new package set.
config_whitelist = ["product_id", "pkgset_koji_builds"]
if opt in config_whitelist:
continue

View File

@ -1135,7 +1135,7 @@ class TestReuseOldGatherPackages(helpers.PungiTestCase):
def test_reuse_compose_config_different_whitelist(
self, load_old_compose_config, load_old_gather_result
):
for whitelist_opt in ["product_id"]:
for whitelist_opt in ["product_id", "pkgset_koji_builds"]:
load_old_gather_result.return_value = {
"rpm": [{"path": "/build/bash-1.0.0-1.x86_64.rpm"}],
"srpm": [],