launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23317
[Merge] lp:~cjwatson/launchpad-buildd/rename-register-builder into lp:launchpad-buildd
Colin Watson has proposed merging lp:~cjwatson/launchpad-buildd/rename-register-builder into lp:launchpad-buildd.
Commit message:
Rename registerBuilder to registerManager.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/rename-register-builder/+merge/363045
This makes more sense given its arguments, and it makes room for renaming "slave" to "builder".
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad-buildd/rename-register-builder into lp:launchpad-buildd.
=== modified file 'lpbuildd/buildd-slave.tac'
--- lpbuildd/buildd-slave.tac 2018-06-05 20:59:48 +0000
+++ lpbuildd/buildd-slave.tac 2019-02-12 10:32:18 +0000
@@ -40,12 +40,12 @@
conf.read(conffile)
slave = XMLRPCBuildDSlave(conf)
-slave.registerBuilder(BinaryPackageBuildManager, "binarypackage")
-slave.registerBuilder(SourcePackageRecipeBuildManager, "sourcepackagerecipe")
-slave.registerBuilder(
+slave.registerManager(BinaryPackageBuildManager, "binarypackage")
+slave.registerManager(SourcePackageRecipeBuildManager, "sourcepackagerecipe")
+slave.registerManager(
TranslationTemplatesBuildManager, 'translation-templates')
-slave.registerBuilder(LiveFilesystemBuildManager, "livefs")
-slave.registerBuilder(SnapBuildManager, "snap")
+slave.registerManager(LiveFilesystemBuildManager, "livefs")
+slave.registerManager(SnapBuildManager, "snap")
application = service.Application('BuildDSlave')
application.addComponent(
=== modified file 'lpbuildd/slave.py'
--- lpbuildd/slave.py 2019-02-11 12:22:42 +0000
+++ lpbuildd/slave.py 2019-02-12 10:32:18 +0000
@@ -710,7 +710,7 @@
# the reduced and optimised XMLRPC interface.
self.protocolversion = '1.0'
self.slave = BuildDSlave(config)
- self._builders = {}
+ self._managers = {}
cache = apt.Cache()
try:
installed = cache["python-lpbuildd"].installed
@@ -719,17 +719,17 @@
self._version = None
log.msg("Initialized")
- def registerBuilder(self, builderclass, buildertag):
- self._builders[buildertag] = builderclass
+ def registerManager(self, managerclass, managertag):
+ self._managers[managertag] = managerclass
def xmlrpc_echo(self, *args):
"""Echo the argument back."""
return args
def xmlrpc_info(self):
- """Return the protocol version and the builder methods supported."""
+ """Return the protocol version and the manager methods supported."""
return (self.protocolversion, self.slave.getArch(),
- list(self._builders))
+ list(self._managers))
def xmlrpc_status(self):
"""Return the status of the build daemon, as a dictionary.
@@ -802,15 +802,15 @@
self.slave.clean()
return BuilderStatus.IDLE
- def xmlrpc_build(self, buildid, builder, chrootsum, filemap, args):
+ def xmlrpc_build(self, buildid, managertag, chrootsum, filemap, args):
"""Check if requested arguments are sane and initiate build procedure
return a tuple containing: (<builder_status>, <info>)
"""
- # check requested builder
- if not builder in self._builders:
- extra_info = "%s not in %r" % (builder, list(self._builders))
+ # check requested manager
+ if managertag not in self._managers:
+ extra_info = "%s not in %r" % (managertag, list(self._managers))
return (BuilderStatus.UNKNOWNBUILDER, extra_info)
# check requested chroot availability
chroot_present, info = self.slave.ensurePresent(chrootsum)
@@ -838,6 +838,6 @@
# builder is available, buildd is non empty,
# filelist is consistent, chrootsum is available, let's initiate...
self.buildid = buildid
- self.slave.startBuild(self._builders[builder](self.slave, buildid))
+ self.slave.startBuild(self._managers[managertag](self.slave, buildid))
self.slave.manager.initiate(filemap, chrootsum, args)
return (BuilderStatus.BUILDING, buildid)