From bb8cd030ec868464252f78dd74c2cfde4533d86c Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Tue, 10 Nov 2020 12:52:02 +0100 Subject: [PATCH] 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 --- pungi/phases/gather/__init__.py | 10 ++++++++-- tests/test_gather_phase.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pungi/phases/gather/__init__.py b/pungi/phases/gather/__init__.py index 8667b678..bf190335 100644 --- a/pungi/phases/gather/__init__.py +++ b/pungi/phases/gather/__init__.py @@ -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 diff --git a/tests/test_gather_phase.py b/tests/test_gather_phase.py index bf831c19..e120fea2 100644 --- a/tests/test_gather_phase.py +++ b/tests/test_gather_phase.py @@ -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": [],