From 60698b67b4410b422b1aba04a3eb74da243f404c Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Sun, 17 May 2020 05:26:29 +0200 Subject: 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 --- zuul/driver/gitlab/gitlabconnection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.1