Freeze Break Request: FMN - drop the 'deleted build' messages.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'd like to apply this hotfix to the notifications backend to have it
drop all the messages in its queue about builds being deleted from
koji.

Koji garbage collection just started working again, and it's been
spouting messages all day long about it.  It's about halfway through
the alphabet and we now have a multiple-hour-long backlog in the FMN
queue:  http://threebean.org/fedmsg-health-day.html#FMN

This will only be temporary until this wave is over.  We'll resume
notifying people about deleted builds after this is done with.

Note that, we'll still have a record about what builds were deleted in
the datagrepper history.  This will only squash the developer
notifications.

Can I get two +1s to apply this change?


diff --git a/fmn/consumer/consumer.py b/fmn/consumer/consumer.py
index 9840b93..99f4239 100644
--- a/fmn/consumer/consumer.py
+++ b/fmn/consumer/consumer.py
@@ -101,6 +101,13 @@ class FMNConsumer(fedmsg.consumers.FedmsgConsumer):
                 log.debug("Dropping %r", topic)
                 return
 
+        if topic.endswith('buildsys.build.state.change'):
+            # This is the internal koji code for a "deleted" build
+            # See an example here:  http://da.gd/41KV
+            if msg['msg']['new'] == 2:
+                log.debug('Dropping deleted build message.')
+                return
+
         start = time.time()
         log.debug("FMNConsumer received %s %s", msg['msg_id'], msg['topic'])
 

Attachment: signature.asc
Description: PGP signature

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux