From d7c97f81350336277e69a6b5c79aebdbc31ac265 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Thu, 15 Dec 2022 14:41:43 +0000 Subject: [gitlab driver] fix "'EnqueueEvent' object has no attribute 'change_url'" This change fixes an issue that prevent an admin to use the zuul enqueue and enqueue-ref commands. File "/usr/local/lib/python3.8/site-packages/zuul/driver/gitlab/gitlabconnection.py", line 602, in _getChange AttributeError: 'EnqueueEvent' object has no attribute 'change_url' Change-Id: Iceaeadc64baee26adb71909122d8c55314b8e036 --- zuul/driver/gitlab/gitlabconnection.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/zuul/driver/gitlab/gitlabconnection.py b/zuul/driver/gitlab/gitlabconnection.py index 40cac241a..1515db8df 100644 --- a/zuul/driver/gitlab/gitlabconnection.py +++ b/zuul/driver/gitlab/gitlabconnection.py @@ -607,17 +607,12 @@ class GitlabConnection(ZKChangeCacheMixin, ZKBranchCacheMixin, BaseConnection): return change project = self.source.getProject(change_key.project_name) if not change: - if not event: - self.log.error("Change %s not found in cache and no event", - change_key) - if event: - url = event.change_url change = MergeRequest(project.name) change.project = project change.number = number # patch_number is the tips commit SHA of the MR change.patchset = change_key.revision - change.url = url or self.getMRUrl(project.name, number) + change.url = self.getMRUrl(project.name, number) change.uris = [change.url.split('://', 1)[-1]] # remove scheme log.debug("Getting change mr#%s from project %s" % ( -- cgit v1.2.1