summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>2020-05-17 05:26:29 +0200
committerPierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>2020-05-17 06:15:54 +0200
commit60698b67b4410b422b1aba04a3eb74da243f404c (patch)
tree9379cb36183b9d75ac21146383211d995c383d44
parent931eac4030cc7e8e1a13a1e32947db90f37219a5 (diff)
downloadzuul-60698b67b4410b422b1aba04a3eb74da243f404c.tar.gz
Gitlab - avoid duplicates in the cache
The change number is either a str (when 'zuul enqueue' is used) or an int (when a Gitlab event is received). Change-Id: Ib110716ecb0d364ab3624bc369aa428a600a3753
-rw-r--r--zuul/driver/gitlab/gitlabconnection.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/zuul/driver/gitlab/gitlabconnection.py b/zuul/driver/gitlab/gitlabconnection.py
index a75e09e6f..0156e3641 100644
--- a/zuul/driver/gitlab/gitlabconnection.py
+++ b/zuul/driver/gitlab/gitlabconnection.py
@@ -377,7 +377,7 @@ class GitlabConnection(BaseConnection):
def _getChange(self, project, number, patchset=None,
refresh=False, url=None, event=None):
log = get_annotated_logger(self.log, event)
- key = (project.name, number, patchset)
+ key = (project.name, str(number), str(patchset))
change = self._change_cache.get(key)
if change and not refresh:
log.debug("Getting change from cache %s" % str(key))