From 088a0d9e5ffce4b76a3d030ddeffd320f7dc180d Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 30 Jan 2015 20:46:26 +0000 Subject: [PATCH] Don't publish uninformative rpm.sign messages. --- roles/koji_hub/files/fedmsg-koji-plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/koji_hub/files/fedmsg-koji-plugin.py b/roles/koji_hub/files/fedmsg-koji-plugin.py index 38187a6053..d4e01d460c 100644 --- a/roles/koji_hub/files/fedmsg-koji-plugin.py +++ b/roles/koji_hub/files/fedmsg-koji-plugin.py @@ -148,6 +148,12 @@ def send_message(cbtype, *args, **kws): # and the secondary hubs off for s390 and ppc. body['instance'] = 'primary' + # Don't publish these uninformative rpm.sign messages if there's no actual + # sigkey present. Koji apparently adds a dummy sig value when rpms are + # first imported and there's no need to spam the world about that. + if topic == 'rpm.sign' and body.get('info', {}).get('sigkey') == '': + return + # Last thing to do before publishing: scrub some problematic fields # These fields are floating points which get json-encoded differently on # rhel and fedora.