summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zuul/driver/github/githubconnection.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py
index a7aefe0cd..b766c6f55 100644
--- a/zuul/driver/github/githubconnection.py
+++ b/zuul/driver/github/githubconnection.py
@@ -684,8 +684,7 @@ class GithubConnection(BaseConnection):
change.files = self.getPushedFileNames(event)
return change
- def _getChange(self, project, number, patchset=None, refresh=False,
- history=None):
+ def _getChange(self, project, number, patchset=None, refresh=False):
key = (project.name, number, patchset)
change = self._change_cache.get(key)
if change and not refresh:
@@ -697,7 +696,7 @@ class GithubConnection(BaseConnection):
change.patchset = patchset
self._change_cache[key] = change
try:
- self._updateChange(change, history)
+ self._updateChange(change)
except Exception:
if key in self._change_cache:
del self._change_cache[key]
@@ -769,13 +768,7 @@ class GithubConnection(BaseConnection):
return changes
- def _updateChange(self, change, history=None):
- # If this change is already in the history, we have a cyclic
- # dependency loop and we do not need to update again, since it
- # was done in a previous frame.
- if history and (change.project.name, change.number) in history:
- return change
-
+ def _updateChange(self, change):
self.log.info("Updating %s" % (change,))
change.pr = self.getPull(change.project.name, change.number)
change.ref = "refs/pull/%s/head" % change.number
@@ -794,12 +787,6 @@ class GithubConnection(BaseConnection):
change.updated_at = self._ghTimestampToDate(
change.pr.get('updated_at'))
- if history is None:
- history = []
- else:
- history = history[:]
- history.append((change.project.name, change.number))
-
self.sched.onChangeUpdated(change)
return change