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
This commit is contained in:
Pierre-Louis Bonicoli 2020-05-17 05:26:29 +02:00
parent 931eac4030
commit 60698b67b4
No known key found for this signature in database
GPG Key ID: 06914C4A5EDAA6DD
1 changed files with 1 additions and 1 deletions

View File

@ -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))