From 107025cacfa93c0f525cad0a3747418a28fac5bd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 30 2020 09:18:14 +0000 Subject: The product_cache should be namespaced by product Otherwise, Fedora cockpit and Fedora Container Images cockpit will override each other. Signed-off-by: Pierre-Yves Chibon --- diff --git a/toddlers/plugins/distgit_bugzilla_sync.py b/toddlers/plugins/distgit_bugzilla_sync.py index f3fb285..70f6367 100644 --- a/toddlers/plugins/distgit_bugzilla_sync.py +++ b/toddlers/plugins/distgit_bugzilla_sync.py @@ -158,8 +158,10 @@ class DistgitBugzillaSync(ToddlerBase): _log.debug("Building bugzilla's products in-memory cache") product_cache = {} - for collection, product in config["products"].items(): - product_cache.update(bugzilla_system.get_product_info_packages(collection)) + for collection in config["products"]: + product_cache[collection] = bugzilla_system.get_product_info_packages( + collection + ) times["BZ cache building end"] = time.time() if dry_run: @@ -211,12 +213,12 @@ class DistgitBugzillaSync(ToddlerBase): package = project["name"] try: - if package in product_cache: + if package in product_cache.get(product, []): bugzilla_system.edit_component( owner=fas_to_bz_mail[owner], product=product, - package=package, - component=product_cache[package], + package=project["name"], + component=product_cache[product][package], cc_list=cc_list, versions=config["products"][product]["versions"], description=project["summary"], @@ -230,7 +232,7 @@ class DistgitBugzillaSync(ToddlerBase): bugzilla_system.add_component( product=product, owner=fas_to_bz_mail[owner], - package=package, + package=project["name"], qa_contact=qa_contact_email, cc_list=cc_list, fas_users_info=bz_mail_to_fas,