summaryrefslogtreecommitdiff
path: root/zuul/driver/github
diff options
context:
space:
mode:
authorJames E. Blair <jim@acmegating.com>2021-09-22 19:52:39 -0700
committerJames E. Blair <jim@acmegating.com>2021-09-24 11:47:45 -0700
commitcd4f7539c11f98e4bc0e1194ca28da9ee577b946 (patch)
tree89cc3e24e535da63e857040baab0117e97eb41ae /zuul/driver/github
parent025356aeda81db974ddad1512971dcf45b19d5ac (diff)
downloadzuul-cd4f7539c11f98e4bc0e1194ca28da9ee577b946.tar.gz
Remove onChangeUpdated method
The onChangeUpdated method is called every time a change is updated. Its purpose is to iterate over every change in the cache and, if the updated change is a commit dependency (Depends-On) of the other change, to set a flag telling the queue processor that changes' dependencies are out of date and need to be refreshed. The idea is that if this happens, the queue processor should notice the dependencies no longer match and dequeue it. This became quite slow with the change cache in ZK. Instead, we can do the following: * Make sure that every event regarding a change is forwarded to every pipeline with that change in it (including non-live changes). * When processing pipeline trigger events, refresh the dependencies of any changes that need to be updated. There are a few cases that need to be covered in that last point (but remember, all of this only applies to Depends-on footers which are in the commit_needs variable): * Changes to depends-on in gerrit necessarily mean a new patchset of the change with the depends-on header, so in the B->A situation, if B is updated, it will be re-enqueued. * Note that normally the orignal B->A series is dequeued, unless dequeue-on-new-patchset is false. In that case it will remain and we will have B->A and B1->A, which is what the user asked for. To handle this case, we only need to refresh the deps of the change which is updated. * In a C->B->A situation in gerrit, if B is updated then regardless of whether dequeue-on-new-patchset is true or false, the series should be dequeued because the dependency changed (and so the test setup is incorrect). To handle this case, we need to refresh the deps of any change whose commit_needs point to the updated change. * Changes to depends-on in github don't create new patchsets, so we only need to refresh the deps of the change which is updated. Because the changes it points to are still valid changes, they will have their own deps refreshed in place. Change-Id: Ifc40ff5583a14c7f015356b963e1ba354974e1c8
Diffstat (limited to 'zuul/driver/github')
-rw-r--r--zuul/driver/github/githubconnection.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py
index 690494950..8307990aa 100644
--- a/zuul/driver/github/githubconnection.py
+++ b/zuul/driver/github/githubconnection.py
@@ -1306,9 +1306,6 @@ class GithubConnection(ZKChangeCacheMixin, CachedBranchConnection):
change = self._change_cache.updateChangeWithRetry(
key, change, _update_change)
-
- if self.sched:
- self.sched.onChangeUpdated(change, event)
finally:
# We need to remove the lock here again so we don't leak
# them.