From c235bec159f875ea7f1dc1915e0edb8559393093 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: May 15 2017 17:59:56 +0000 Subject: Add special case handling for the f26-modularity tag. Signed-off-by: Ralph Bean --- diff --git a/robosignatory/tagconsumer.py b/robosignatory/tagconsumer.py index 65e609e..218ec94 100644 --- a/robosignatory/tagconsumer.py +++ b/robosignatory/tagconsumer.py @@ -132,9 +132,24 @@ class TagSignerConsumer(fedmsg.consumers.FedmsgConsumer): tag_name = tag["name"] if tag_name.endswith("-build"): tag_name = tag_name[:-len("-build")] + query["koji_tag"] = tag_name if active is not None: query["active"] = active + + if tag_name == 'f26-modularity': + # This was the manually created tag used to initially bootstrap + # the modularity infrastructure. We have to handle it as a + # special case for now until we can duplicate it into two + # separate tags with two separate PDC entries for rawhide and + # f26. See discussion here: + # https://meetbot.fedoraproject.org/fedora-meeting-2/2017-05-15/releng.2017-05-15-14.31.log.html + + # This first part of this conditional can be removed when the + # following ticket is resolved: + # https://pagure.io/releng/issue/6791 + query['variant_version'] = 'f26' + retval = self.pdc_client.unreleasedvariants(page_size=-1, **query) if not retval or len(retval) != 1: @@ -157,7 +172,10 @@ class TagSignerConsumer(fedmsg.consumers.FedmsgConsumer): """ # Handle only tags with modular prefix. - if not info['name'].startswith(self.module_prefixes): + # ... but also handle a special case for "f26-modularity" until + # https://pagure.io/releng/issue/6791 is resolved. + if (not info['name'].startswith(self.module_prefixes) + and info['name'] != "f26-modularity"): return None @@ -184,7 +202,10 @@ class TagSignerConsumer(fedmsg.consumers.FedmsgConsumer): info = session.getTag(parent_tag_id) if info is None: continue - if not info['name'].endswith("-build"): + + # TODO - remove the "f26-modularity" part of this conditional once + # the following ticket is resolved: https://pagure.io/releng/issue/6791 + if not info['name'].endswith("-build") and info['name'] != "f26-modularity": info = session.getTag(info['name'] + "-build") if info is None: continue