Hashar has submitted this change and it was merged. Change subject: 2.1.0-151-g30a433b-wmf4precise ......................................................................
2.1.0-151-g30a433b-wmf4precise Have zuul-server layout validation to recognize multiples connections. See debian/changelog Change-Id: I1f021b5983b19668a5a5c470bc3b65ade42a510b --- M debian/changelog A debian/patches/0009-Register-connections-when-testing-configuration.patch M debian/patches/series 3 files changed, 61 insertions(+), 0 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve Hashar: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index cfed39d..1399df7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +zuul (2.1.0-151-g30a433b-wmf4precise1) precise-wikimedia; urgency=medium + + * Zuul server layout validation would not recognize multiple Gerrit + connections dieing with: KeyError: 'oldgerrit'. Add patch suggested by + Paladox: + [9a25675] Register connections when testing configuration + * Bump GitPython 2.0.6..2.0.7 + + -- Antoine Musso <[email protected]> Mon, 18 Jul 2016 16:24:58 +0200 + zuul (2.1.0-151-g30a433b-wmf3precise1) precise-wikimedia; urgency=medium * Fix upstream refactoring of Gerrit connections which caused Paramiko 1.7.1 diff --git a/debian/patches/0009-Register-connections-when-testing-configuration.patch b/debian/patches/0009-Register-connections-when-testing-configuration.patch new file mode 100644 index 0000000..01d4bfb --- /dev/null +++ b/debian/patches/0009-Register-connections-when-testing-configuration.patch @@ -0,0 +1,50 @@ +From: Joshua Hesketh <[email protected]> +Date: Mon, 4 Apr 2016 13:38:51 +1000 +Subject: Register connections when testing configuration + +The layout validation requires the connections to be registered +with the scheduler to know what connection names are valid in the +layout.yaml. + +However avoid starting the connections so that things like the +gerrit connection don't start streaming from gerrit yet. + +Change-Id: Ie9a03287835c6966f5ac32cac020cf2642ce27d5 +--- + zuul/cmd/server.py | 1 + + zuul/scheduler.py | 7 +++++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/zuul/cmd/server.py b/zuul/cmd/server.py +index 8861972..e713a52 100755 +--- a/zuul/cmd/server.py ++++ b/zuul/cmd/server.py +@@ -88,6 +88,7 @@ class Server(zuul.cmd.ZuulApp): + logging.basicConfig(level=logging.DEBUG) + self.sched = zuul.scheduler.Scheduler(self.config) + self.configure_connections() ++ self.sched.registerConnections(self.connections, load=False) + layout = self.sched.testConfig(self.config.get('zuul', + 'layout_config'), + self.connections) +diff --git a/zuul/scheduler.py b/zuul/scheduler.py +index aea9a67..b631344 100644 +--- a/zuul/scheduler.py ++++ b/zuul/scheduler.py +@@ -313,11 +313,14 @@ class Scheduler(threading.Thread): + # Any skip-if predicate can be matched to trigger a skip + return cm.MatchAny(skip_matchers) + +- def registerConnections(self, connections): ++ def registerConnections(self, connections, load=True): ++ # load: whether or not to trigger the onLoad for the connection. This ++ # is useful for not doing a full load during layout validation. + self.connections = connections + for connection_name, connection in self.connections.items(): + connection.registerScheduler(self) +- connection.onLoad() ++ if load: ++ connection.onLoad() + + def stopConnections(self): + for connection_name, connection in self.connections.items(): diff --git a/debian/patches/series b/debian/patches/series index f498258..5d0a3c0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ 0006-Properly-shutdown-apscheduler-on-reconfigure.patch 0007-GerritWatcher-add-poll_timeout.patch 0008-Do-not-import-paramiko-before-daemonization.patch +0009-Register-connections-when-testing-configuration.patch -- To view, visit https://gerrit.wikimedia.org/r/299545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f021b5983b19668a5a5c470bc3b65ade42a510b Gerrit-PatchSet: 2 Gerrit-Project: integration/zuul Gerrit-Branch: debian/precise-wikimedia Gerrit-Owner: Hashar <[email protected]> Gerrit-Reviewer: Hashar <[email protected]> Gerrit-Reviewer: Paladox <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
