diff --git a/distgit_bugzilla_sync/default-config-files/configuration.toml b/distgit_bugzilla_sync/default-config-files/configuration.toml index 3cd5dd2..709a443 100644 --- a/distgit_bugzilla_sync/default-config-files/configuration.toml +++ b/distgit_bugzilla_sync/default-config-files/configuration.toml @@ -14,9 +14,9 @@ ignorable_accounts = ["packagerbot", "zuul"] namespace = "rpms" versions = ["rawhide", "31", "30", "29"] [products."Fedora Container"] + [products."Fedora Container Images"] namespace = "container" versions = ["rawhide", "29"] - bz_product_name = "Fedora Container Images" [products."Fedora Modules"] namespace = "modules" versions = [] diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index 7678515..db64e92 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -177,22 +177,21 @@ class BugzillaProxy: # Old API -- in python-bugzilla. But with current server, this # gives ProxyError for collection, product in self.config["products"].items(): - bz_product_name = product.get("bz_product_name", collection) self.product_cache[collection] = self.server.getcomponentsdetails( - bz_product_name + collection ) elif self.config["bugzilla"]["compat_api"] == "component.get": # Way that's undocumented in the partner-bugzilla api but works # currently chunk = self.config["bugzilla"]["req_segment"] for collection, product in self.config["products"].items(): - bz_product_name = product.get("bz_product_name", collection) + # restrict the list of info returned to only the packages of # interest pkglist = [ project["name"] for project in pagure_projects - if bz_product_name in project["products"] + if collection in project["products"] ] product_info_by_pkg = {} estimated_size = math.ceil(len(pkglist) / chunk) @@ -200,13 +199,13 @@ class BugzillaProxy: # Format that bugzilla will understand. Strip None's that # segment() pads out the final data segment() with query = [ - {"product": bz_product_name, "component": p} + {"product": collection, "component": p} for p in pkg_segment if p is not None ] if self.config["verbose"]: print( - f" - Querying product `{bz_product_name}`, " + f" - Querying product `{collection}`, " f"query {cnt} of {estimated_size}" ) raw_data = _query_component(query) @@ -384,9 +383,6 @@ class BugzillaProxy: e.args = ("ProtocolError", e.errcode, e.errmsg) raise - bz_product_name = self.config["products"][collection].get( - "bz_product_name", collection - ) # Set the qacontact_email and name default_qa_contact_email = self.config["default_qa_contact_email"] @@ -431,7 +427,7 @@ class BugzillaProxy: if data: # Changes occurred. Submit a request to change via xmlrpc - data["product"] = bz_product_name + data["product"] = collection data["component"] = package if self.config["verbose"]: @@ -535,21 +531,21 @@ class BugzillaProxy: new_poc=owner_email, prev_poc=product[pkg_key]["initialowner"], name=package, - product=bz_product_name, + product=collection, print_fas_names=print_fas_names, ) else: if self.config.get("print-no-change"): - print(f"[NOCHANGE] {package}/{bz_product_name}") + print(f"[NOCHANGE] {package}/{collection}") else: if retired: if self.config["verbose"]: - print(f"[NOADD] {bz_product_name}/{package} (is retired)") + print(f"[NOADD] {collection}/{package} (is retired)") return # Add component data = { - "product": bz_product_name, + "product": collection, "component": package, "description": description or "NA", "initialowner": owner_email, @@ -579,12 +575,12 @@ class BugzillaProxy: else: value = initial_cc_fasnames print( - f"[ADDCOMP] {bz_product_name}/{package}" + f"[ADDCOMP] {collection}/{package}" f" {key} set to FAS name(s) `{value}`" ) else: print( - f"[ADDCOMP] {bz_product_name}/{package}" + f"[ADDCOMP] {collection}/{package}" f" {key} set to {data.get(key)}" )