Remove updateChange history from github driver
This is not necessary because updateChange in this driver
is no longer recursive.
Change-Id: If0322a5938b17000e9ef4106fa4b0ffcbfa80c89
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py
index a7aefe0..b766c6f 100644
--- a/zuul/driver/github/githubconnection.py
+++ b/zuul/driver/github/githubconnection.py
@@ -684,8 +684,7 @@
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 @@
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 @@
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 @@
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