From 92bbc2fe02423bdfece2c63d80f87c5a44544532 Mon Sep 17 00:00:00 2001 From: Tobias Henkel Date: Tue, 16 Nov 2021 22:38:24 +0100 Subject: [PATCH] Remove reported_enqueue flag from queue item It seems that we check for the reported_enqueue flag only when initially enqueueing an item. This we can remove it and save a zookeeper operation when enqueueing a change. Change-Id: Ic869698e882377217410ea66825c5c999f9ae322 --- zuul/manager/__init__.py | 4 +--- zuul/model.py | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/zuul/manager/__init__.py b/zuul/manager/__init__.py index 7fc7208eb9..66a461074e 100644 --- a/zuul/manager/__init__.py +++ b/zuul/manager/__init__.py @@ -546,10 +546,8 @@ class PipelineManager(metaclass=ABCMeta): self.reportStats(item, added=True) item.quiet = quiet - if item.live and not item.reported_enqueue: + if item.live: self.reportEnqueue(item) - item.updateAttributes(self.current_context, - reported_enqueue=True) # Items in a dependency cycle are expected to be enqueued after # each other. To prevent non-cycle items from being enqueued diff --git a/zuul/model.py b/zuul/model.py index 2b0593dcfc..0ce90ebdd4 100644 --- a/zuul/model.py +++ b/zuul/model.py @@ -3930,7 +3930,6 @@ class QueueItem(zkobject.ZKObject): report_time=None, dequeue_time=None, reported=False, - reported_enqueue=False, reported_start=False, quiet=False, active=False, # Whether an item is within an active window @@ -3989,7 +3988,6 @@ class QueueItem(zkobject.ZKObject): "report_time": self.report_time, "dequeue_time": self.dequeue_time, "reported": self.reported, - "reported_enqueue": self.reported_enqueue, "reported_start": self.reported_start, "quiet": self.quiet, "active": self.active,