summaryrefslogtreecommitdiff
path: root/zuul/driver/github/githubconnection.py
diff options
context:
space:
mode:
authorSimon Westphahl <simon.westphahl@bmw.de>2023-03-13 12:41:19 +0100
committerSimon Westphahl <simon.westphahl@bmw.de>2023-03-23 09:14:50 +0100
commit782be9a9902046c7c0d282b78d7786a3cbb5b905 (patch)
treef45a82ae3e18bcb6fc04cfff45cd97f779194350 /zuul/driver/github/githubconnection.py
parent0d35927e2c0a010aae92b8f08997b036c318d55a (diff)
downloadzuul-782be9a9902046c7c0d282b78d7786a3cbb5b905.tar.gz
Set cache ltime when branch protection changed
When we detect newly protected branche we also need to set the branch cache ltime accordingly. Otherwise we might end up with schedulers using an outdated branch cache during reconfig and layout update which can result in config not being loaded. Change-Id: Ie18ef0ce9664e58d25f34018f8eb4513bc8b559a
Diffstat (limited to 'zuul/driver/github/githubconnection.py')
-rw-r--r--zuul/driver/github/githubconnection.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py
index cffbd6769..738862974 100644
--- a/zuul/driver/github/githubconnection.py
+++ b/zuul/driver/github/githubconnection.py
@@ -679,6 +679,11 @@ class GithubEventProcessor(object):
branch, project_name)
events.append(
self._branch_protection_rule_to_event(project_name, branch))
+
+ for event in events:
+ # Make sure every event has a branch cache ltime
+ self.connection.clearConnectionCacheOnBranchEvent(event)
+
return events
def _branch_protection_rule_to_event(self, project_name, branch):