diff --git a/zuul/driver/gerrit/gerritconnection.py b/zuul/driver/gerrit/gerritconnection.py index 69e651b6e3..0e242a8e67 100644 --- a/zuul/driver/gerrit/gerritconnection.py +++ b/zuul/driver/gerrit/gerritconnection.py @@ -230,13 +230,6 @@ class GerritEventConnector(threading.Thread): event.type = data.get('type') event.uuid = data.get('uuid') - # NOTE(mnaser): Certain plugins fire events which end up causing - # an unrecognized event log *and* a traceback if they - # do not contain full project information, we skip them - # here to keep logs clean. - if event.type in GerritEventConnector.IGNORED_EVENTS: - return - # This catches when a change is merged, as it could potentially # have merged layout info which will need to be read in. # Ideally this would be done with a refupdate event so as to catch @@ -1122,6 +1115,13 @@ class GerritConnection(ZKChangeCacheMixin, ZKBranchCacheMixin, BaseConnection): return True def addEvent(self, data): + # NOTE(mnaser): Certain plugins fire events which end up causing + # an unrecognized event log *and* a traceback if they + # do not contain full project information, we skip them + # here to keep logs clean. + if data.get('type') in GerritEventConnector.IGNORED_EVENTS: + return + event = { "timestamp": time.time(), "payload": data