summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Westphahl <simon.westphahl@bmw.de>2022-07-04 13:51:35 +0200
committerSimon Westphahl <simon.westphahl@bmw.de>2022-07-04 13:54:11 +0200
commite31b0bfb1109a64acf2583d516bd8d6ee9e4c9e5 (patch)
treecfc56644aade3dfe46e5c904f46cb7f580595a2d
parent87ea63eee39b061e6cb5e11697ac7c4df8247c6d (diff)
downloadzuul-e31b0bfb1109a64acf2583d516bd8d6ee9e4c9e5.tar.gz
Only update commit dependencies when necessary
While I1c102b338ae6de05f3a752eb79f65744869e1860 fixed the referenced exception it also introduced a performance problem. The issue was that commit dependencies were always refreshed when a change was not found in the local pipeline cache. This cache is always empty when the pipeline's post-config hook is called after a reconfiguration. Due to that this change could lead to longer reconfigurations when a lot of items with dependencies were in progress at that time. Change-Id: I4d6c717903f17aa0770741ff948d9f594772891d
-rw-r--r--zuul/manager/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/zuul/manager/__init__.py b/zuul/manager/__init__.py
index ccaf943b3..642aededd 100644
--- a/zuul/manager/__init__.py
+++ b/zuul/manager/__init__.py
@@ -228,7 +228,8 @@ class PipelineManager(metaclass=ABCMeta):
change = source.getChange(key)
if change is None:
self.log.error("Unable to resolve change from key %s", key)
- if isinstance(change, model.Change):
+ if (isinstance(change, model.Change)
+ and change.commit_needs_changes is None):
self.updateCommitDependencies(change, None, event=None)
self._change_cache[change.cache_key] = change
resolved_changes.append(change)