Merge ~cjwatson/launchpad:rename-builder-interactor-slave into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 49163ad5cdf93c027e62fd51dea09bdf52ef6d12
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:rename-builder-interactor-slave
Merge into: launchpad:master
Prerequisite: ~cjwatson/launchpad:rename-bfj-behaviour-slave
Diff against target: 392 lines (+65/-65)
4 files modified
lib/lp/buildmaster/interactor.py (+32/-32)
lib/lp/buildmaster/manager.py (+3/-3)
lib/lp/buildmaster/tests/test_interactor.py (+29/-29)
lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py (+1/-1)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Review via email: mp+414045@code.launchpad.net

Commit message

Rename "slave" in BuilderInteractor to "worker"

To post a comment you must log in.
Revision history for this message
Ioana Lasc (ilasc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/buildmaster/interactor.py b/lib/lp/buildmaster/interactor.py
index 3aaae63..e8a1d7f 100644
--- a/lib/lp/buildmaster/interactor.py
+++ b/lib/lp/buildmaster/interactor.py
@@ -345,7 +345,7 @@ def extract_vitals_from_db(builder, build_queue=_BQ_UNSPECIFIED):
345class BuilderInteractor:345class BuilderInteractor:
346346
347 @staticmethod347 @staticmethod
348 def makeSlaveFromVitals(vitals):348 def makeWorkerFromVitals(vitals):
349 if vitals.virtualized:349 if vitals.virtualized:
350 timeout = config.builddmaster.virtualized_socket_timeout350 timeout = config.builddmaster.virtualized_socket_timeout
351 else:351 else:
@@ -354,19 +354,19 @@ class BuilderInteractor:
354 vitals.url, vitals.vm_host, timeout)354 vitals.url, vitals.vm_host, timeout)
355355
356 @staticmethod356 @staticmethod
357 def getBuildBehaviour(queue_item, builder, slave):357 def getBuildBehaviour(queue_item, builder, worker):
358 if queue_item is None:358 if queue_item is None:
359 return None359 return None
360 behaviour = IBuildFarmJobBehaviour(queue_item.specific_build)360 behaviour = IBuildFarmJobBehaviour(queue_item.specific_build)
361 behaviour.setBuilder(builder, slave)361 behaviour.setBuilder(builder, worker)
362 return behaviour362 return behaviour
363363
364 @classmethod364 @classmethod
365 def resumeSlaveHost(cls, vitals, slave):365 def resumeWorkerHost(cls, vitals, worker):
366 """Resume the slave host to a known good condition.366 """Resume the worker host to a known good condition.
367367
368 Issues 'builddmaster.vm_resume_command' specified in the configuration368 Issues 'builddmaster.vm_resume_command' specified in the configuration
369 to resume the slave.369 to resume the worker.
370370
371 :raises: CannotResumeHost: if builder is not virtual or if the371 :raises: CannotResumeHost: if builder is not virtual or if the
372 configuration command has failed.372 configuration command has failed.
@@ -384,7 +384,7 @@ class BuilderInteractor:
384 logger = cls._getWorkerScannerLogger()384 logger = cls._getWorkerScannerLogger()
385 logger.info("Resuming %s (%s)" % (vitals.name, vitals.url))385 logger.info("Resuming %s (%s)" % (vitals.name, vitals.url))
386386
387 d = slave.resume()387 d = worker.resume()
388388
389 def got_resume_ok(args):389 def got_resume_ok(args):
390 stdout, stderr, returncode = args390 stdout, stderr, returncode = args
@@ -400,38 +400,38 @@ class BuilderInteractor:
400400
401 @classmethod401 @classmethod
402 @defer.inlineCallbacks402 @defer.inlineCallbacks
403 def cleanSlave(cls, vitals, slave, builder_factory):403 def cleanWorker(cls, vitals, worker, builder_factory):
404 """Prepare a slave for a new build.404 """Prepare a worker for a new build.
405405
406 :return: A Deferred that fires when this stage of the resume406 :return: A Deferred that fires when this stage of the resume
407 operations finishes. If the value is True, the slave is now clean.407 operations finishes. If the value is True, the worker is now clean.
408 If it's False, the clean is still in progress and this must be408 If it's False, the clean is still in progress and this must be
409 called again later.409 called again later.
410 """410 """
411 if vitals.virtualized:411 if vitals.virtualized:
412 if vitals.vm_reset_protocol == BuilderResetProtocol.PROTO_1_1:412 if vitals.vm_reset_protocol == BuilderResetProtocol.PROTO_1_1:
413 # In protocol 1.1 the reset trigger is synchronous, so413 # In protocol 1.1 the reset trigger is synchronous, so
414 # once resumeSlaveHost returns the slave should be414 # once resumeWorkerHost returns the worker should be
415 # running.415 # running.
416 builder_factory[vitals.name].setCleanStatus(416 builder_factory[vitals.name].setCleanStatus(
417 BuilderCleanStatus.CLEANING)417 BuilderCleanStatus.CLEANING)
418 transaction.commit()418 transaction.commit()
419 yield cls.resumeSlaveHost(vitals, slave)419 yield cls.resumeWorkerHost(vitals, worker)
420 # We ping the resumed slave before we try to do anything420 # We ping the resumed worker before we try to do anything
421 # useful with it. This is to ensure it's accepting421 # useful with it. This is to ensure it's accepting
422 # packets from the outside world, because testing has422 # packets from the outside world, because testing has
423 # shown that the first packet will randomly fail for no423 # shown that the first packet will randomly fail for no
424 # apparent reason. This could be a quirk of the Xen424 # apparent reason. This could be a quirk of the Xen
425 # guest, we're not sure. See bug 586359.425 # guest, we're not sure. See bug 586359.
426 yield slave.echo("ping")426 yield worker.echo("ping")
427 return True427 return True
428 elif vitals.vm_reset_protocol == BuilderResetProtocol.PROTO_2_0:428 elif vitals.vm_reset_protocol == BuilderResetProtocol.PROTO_2_0:
429 # In protocol 2.0 the reset trigger is asynchronous.429 # In protocol 2.0 the reset trigger is asynchronous.
430 # If the trigger succeeds we'll leave the slave in430 # If the trigger succeeds we'll leave the worker in
431 # CLEANING, and the non-LP slave management code will431 # CLEANING, and the non-LP worker management code will
432 # set it back to CLEAN later using the webservice.432 # set it back to CLEAN later using the webservice.
433 if vitals.clean_status == BuilderCleanStatus.DIRTY:433 if vitals.clean_status == BuilderCleanStatus.DIRTY:
434 yield cls.resumeSlaveHost(vitals, slave)434 yield cls.resumeWorkerHost(vitals, worker)
435 builder_factory[vitals.name].setCleanStatus(435 builder_factory[vitals.name].setCleanStatus(
436 BuilderCleanStatus.CLEANING)436 BuilderCleanStatus.CLEANING)
437 transaction.commit()437 transaction.commit()
@@ -441,28 +441,28 @@ class BuilderInteractor:
441 raise CannotResumeHost(441 raise CannotResumeHost(
442 "Invalid vm_reset_protocol: %r" % vitals.vm_reset_protocol)442 "Invalid vm_reset_protocol: %r" % vitals.vm_reset_protocol)
443 else:443 else:
444 worker_status = yield slave.status()444 worker_status = yield worker.status()
445 status = worker_status.get('builder_status', None)445 status = worker_status.get('builder_status', None)
446 if status == 'BuilderStatus.IDLE':446 if status == 'BuilderStatus.IDLE':
447 # This is as clean as we can get it.447 # This is as clean as we can get it.
448 return True448 return True
449 elif status == 'BuilderStatus.BUILDING':449 elif status == 'BuilderStatus.BUILDING':
450 # Asynchronously abort() the slave and wait until WAITING.450 # Asynchronously abort() the worker and wait until WAITING.
451 yield slave.abort()451 yield worker.abort()
452 return False452 return False
453 elif status == 'BuilderStatus.ABORTING':453 elif status == 'BuilderStatus.ABORTING':
454 # Wait it out until WAITING.454 # Wait it out until WAITING.
455 return False455 return False
456 elif status == 'BuilderStatus.WAITING':456 elif status == 'BuilderStatus.WAITING':
457 # Just a synchronous clean() call and we'll be idle.457 # Just a synchronous clean() call and we'll be idle.
458 yield slave.clean()458 yield worker.clean()
459 return True459 return True
460 raise BuildDaemonError(460 raise BuildDaemonError(
461 "Invalid status during clean: %r" % status)461 "Invalid status during clean: %r" % status)
462462
463 @classmethod463 @classmethod
464 @defer.inlineCallbacks464 @defer.inlineCallbacks
465 def _startBuild(cls, build_queue_item, vitals, builder, slave, behaviour,465 def _startBuild(cls, build_queue_item, vitals, builder, worker, behaviour,
466 logger):466 logger):
467 """Start a build on this builder.467 """Start a build on this builder.
468468
@@ -482,7 +482,7 @@ class BuilderInteractor:
482482
483 if builder.clean_status != BuilderCleanStatus.CLEAN:483 if builder.clean_status != BuilderCleanStatus.CLEAN:
484 raise BuildDaemonIsolationError(484 raise BuildDaemonIsolationError(
485 "Attempted to start build on a dirty slave.")485 "Attempted to start build on a dirty worker.")
486486
487 builder.setCleanStatus(BuilderCleanStatus.DIRTY)487 builder.setCleanStatus(BuilderCleanStatus.DIRTY)
488 transaction.commit()488 transaction.commit()
@@ -491,8 +491,8 @@ class BuilderInteractor:
491491
492 @classmethod492 @classmethod
493 @defer.inlineCallbacks493 @defer.inlineCallbacks
494 def findAndStartJob(cls, vitals, builder, slave, builder_factory):494 def findAndStartJob(cls, vitals, builder, worker, builder_factory):
495 """Find a job to run and send it to the buildd slave.495 """Find a job to run and send it to the buildd worker.
496496
497 :return: A Deferred whose value is the `IBuildQueue` instance497 :return: A Deferred whose value is the `IBuildQueue` instance
498 found or None if no job was found.498 found or None if no job was found.
@@ -514,7 +514,7 @@ class BuilderInteractor:
514 logger.debug("No build candidates available for builder.")514 logger.debug("No build candidates available for builder.")
515 return None515 return None
516516
517 new_behaviour = cls.getBuildBehaviour(candidate, builder, slave)517 new_behaviour = cls.getBuildBehaviour(candidate, builder, worker)
518 needed_bfjb = type(removeSecurityProxy(518 needed_bfjb = type(removeSecurityProxy(
519 IBuildFarmJobBehaviour(candidate.specific_build)))519 IBuildFarmJobBehaviour(candidate.specific_build)))
520 if not zope_isinstance(new_behaviour, needed_bfjb):520 if not zope_isinstance(new_behaviour, needed_bfjb):
@@ -522,7 +522,7 @@ class BuilderInteractor:
522 "Inappropriate IBuildFarmJobBehaviour: %r is not a %r" %522 "Inappropriate IBuildFarmJobBehaviour: %r is not a %r" %
523 (new_behaviour, needed_bfjb))523 (new_behaviour, needed_bfjb))
524 yield cls._startBuild(524 yield cls._startBuild(
525 candidate, vitals, builder, slave, new_behaviour, logger)525 candidate, vitals, builder, worker, new_behaviour, logger)
526 return candidate526 return candidate
527527
528 @staticmethod528 @staticmethod
@@ -549,7 +549,7 @@ class BuilderInteractor:
549 """549 """
550 builder_status = worker_status["builder_status"]550 builder_status = worker_status["builder_status"]
551 if builder_status == "BuilderStatus.ABORTING":551 if builder_status == "BuilderStatus.ABORTING":
552 logtail = "Waiting for slave process to be terminated"552 logtail = "Waiting for worker process to be terminated"
553 elif worker_status.get("logtail") is not None:553 elif worker_status.get("logtail") is not None:
554 # worker_status["logtail"] is an xmlrpc.client.Binary instance,554 # worker_status["logtail"] is an xmlrpc.client.Binary instance,
555 # and the contents might include invalid UTF-8 due to being a555 # and the contents might include invalid UTF-8 due to being a
@@ -567,16 +567,16 @@ class BuilderInteractor:
567567
568 @classmethod568 @classmethod
569 @defer.inlineCallbacks569 @defer.inlineCallbacks
570 def updateBuild(cls, vitals, slave, worker_status, builder_factory,570 def updateBuild(cls, vitals, worker, worker_status, builder_factory,
571 behaviour_factory, manager):571 behaviour_factory, manager):
572 """Verify the current build job status.572 """Verify the current build job status.
573573
574 Perform the required actions for each state.574 Perform the required actions for each state.
575575
576 :return: A Deferred that fires when the slave dialog is finished.576 :return: A Deferred that fires when the worker dialog is finished.
577 """577 """
578 # IDLE is deliberately not handled here, because it should be578 # IDLE is deliberately not handled here, because it should be
579 # impossible to get past the cookie check unless the slave579 # impossible to get past the cookie check unless the worker
580 # matches the DB, and this method isn't called unless the DB580 # matches the DB, and this method isn't called unless the DB
581 # says there's a job.581 # says there's a job.
582 builder_status = worker_status['builder_status']582 builder_status = worker_status['builder_status']
@@ -592,7 +592,7 @@ class BuilderInteractor:
592 elif builder_status == 'BuilderStatus.WAITING':592 elif builder_status == 'BuilderStatus.WAITING':
593 # Build has finished. Delegate handling to the build itself.593 # Build has finished. Delegate handling to the build itself.
594 builder = builder_factory[vitals.name]594 builder = builder_factory[vitals.name]
595 behaviour = behaviour_factory(vitals.build_queue, builder, slave)595 behaviour = behaviour_factory(vitals.build_queue, builder, worker)
596 yield behaviour.handleStatus(596 yield behaviour.handleStatus(
597 vitals.build_queue, cls.extractBuildStatus(worker_status),597 vitals.build_queue, cls.extractBuildStatus(worker_status),
598 worker_status)598 worker_status)
diff --git a/lib/lp/buildmaster/manager.py b/lib/lp/buildmaster/manager.py
index ba9c3f1..850b83b 100644
--- a/lib/lp/buildmaster/manager.py
+++ b/lib/lp/buildmaster/manager.py
@@ -431,7 +431,7 @@ class WorkerScanner:
431431
432 def __init__(self, builder_name, builder_factory, manager, logger,432 def __init__(self, builder_name, builder_factory, manager, logger,
433 clock=None, interactor_factory=BuilderInteractor,433 clock=None, interactor_factory=BuilderInteractor,
434 worker_factory=BuilderInteractor.makeSlaveFromVitals,434 worker_factory=BuilderInteractor.makeWorkerFromVitals,
435 behaviour_factory=BuilderInteractor.getBuildBehaviour):435 behaviour_factory=BuilderInteractor.getBuildBehaviour):
436 self.builder_name = builder_name436 self.builder_name = builder_name
437 self.builder_factory = builder_factory437 self.builder_factory = builder_factory
@@ -681,11 +681,11 @@ class WorkerScanner:
681 builder.resetFailureCount()681 builder.resetFailureCount()
682 transaction.commit()682 transaction.commit()
683 else:683 else:
684 # Ask the BuilderInteractor to clean the slave. It might684 # Ask the BuilderInteractor to clean the worker. It might
685 # be immediately cleaned on return, in which case we go685 # be immediately cleaned on return, in which case we go
686 # straight back to CLEAN, or we might have to spin686 # straight back to CLEAN, or we might have to spin
687 # through another few cycles.687 # through another few cycles.
688 done = yield interactor.cleanSlave(688 done = yield interactor.cleanWorker(
689 vitals, slave, self.builder_factory)689 vitals, slave, self.builder_factory)
690 if done:690 if done:
691 builder = self.builder_factory[self.builder_name]691 builder = self.builder_factory[self.builder_name]
diff --git a/lib/lp/buildmaster/tests/test_interactor.py b/lib/lp/buildmaster/tests/test_interactor.py
index fc102be..6e4a790 100644
--- a/lib/lp/buildmaster/tests/test_interactor.py
+++ b/lib/lp/buildmaster/tests/test_interactor.py
@@ -123,7 +123,7 @@ class TestBuilderInteractor(TestCase):
123123
124 def test_extractBuildStatus_baseline(self):124 def test_extractBuildStatus_baseline(self):
125 # extractBuildStatus picks the name of the build status out of a125 # extractBuildStatus picks the name of the build status out of a
126 # dict describing the slave's status.126 # dict describing the worker's status.
127 worker_status = {'build_status': 'BuildStatus.BUILDING'}127 worker_status = {'build_status': 'BuildStatus.BUILDING'}
128 self.assertEqual(128 self.assertEqual(
129 'BUILDING', BuilderInteractor.extractBuildStatus(worker_status))129 'BUILDING', BuilderInteractor.extractBuildStatus(worker_status))
@@ -136,20 +136,20 @@ class TestBuilderInteractor(TestCase):
136 AssertionError, BuilderInteractor.extractBuildStatus,136 AssertionError, BuilderInteractor.extractBuildStatus,
137 worker_status)137 worker_status)
138138
139 def resumeSlaveHost(self, builder):139 def resumeWorkerHost(self, builder):
140 vitals = extract_vitals_from_db(builder)140 vitals = extract_vitals_from_db(builder)
141 return BuilderInteractor.resumeSlaveHost(141 return BuilderInteractor.resumeWorkerHost(
142 vitals, BuilderInteractor.makeSlaveFromVitals(vitals))142 vitals, BuilderInteractor.makeWorkerFromVitals(vitals))
143143
144 def test_resumeSlaveHost_nonvirtual(self):144 def test_resumeWorkerHost_nonvirtual(self):
145 d = self.resumeSlaveHost(MockBuilder(virtualized=False))145 d = self.resumeWorkerHost(MockBuilder(virtualized=False))
146 return assert_fails_with(d, CannotResumeHost)146 return assert_fails_with(d, CannotResumeHost)
147147
148 def test_resumeSlaveHost_no_vmhost(self):148 def test_resumeWorkerHost_no_vmhost(self):
149 d = self.resumeSlaveHost(MockBuilder(virtualized=False, vm_host=None))149 d = self.resumeWorkerHost(MockBuilder(virtualized=False, vm_host=None))
150 return assert_fails_with(d, CannotResumeHost)150 return assert_fails_with(d, CannotResumeHost)
151151
152 def test_resumeSlaveHost_success(self):152 def test_resumeWorkerHost_success(self):
153 reset_config = """153 reset_config = """
154 [builddmaster]154 [builddmaster]
155 vm_resume_command: /bin/echo -n snap %(buildd_name)s %(vm_host)s155 vm_resume_command: /bin/echo -n snap %(buildd_name)s %(vm_host)s
@@ -157,45 +157,45 @@ class TestBuilderInteractor(TestCase):
157 config.push('reset', reset_config)157 config.push('reset', reset_config)
158 self.addCleanup(config.pop, 'reset')158 self.addCleanup(config.pop, 'reset')
159159
160 d = self.resumeSlaveHost(MockBuilder(160 d = self.resumeWorkerHost(MockBuilder(
161 url="http://crackle.ppa/", virtualized=True, vm_host="pop"))161 url="http://crackle.ppa/", virtualized=True, vm_host="pop"))
162162
163 def got_resume(output):163 def got_resume(output):
164 self.assertEqual((b'snap crackle pop', b''), output)164 self.assertEqual((b'snap crackle pop', b''), output)
165 return d.addCallback(got_resume)165 return d.addCallback(got_resume)
166166
167 def test_resumeSlaveHost_command_failed(self):167 def test_resumeWorkerHost_command_failed(self):
168 reset_fail_config = """168 reset_fail_config = """
169 [builddmaster]169 [builddmaster]
170 vm_resume_command: /bin/false"""170 vm_resume_command: /bin/false"""
171 config.push('reset fail', reset_fail_config)171 config.push('reset fail', reset_fail_config)
172 self.addCleanup(config.pop, 'reset fail')172 self.addCleanup(config.pop, 'reset fail')
173 d = self.resumeSlaveHost(MockBuilder(virtualized=True, vm_host="pop"))173 d = self.resumeWorkerHost(MockBuilder(virtualized=True, vm_host="pop"))
174 return assert_fails_with(d, CannotResumeHost)174 return assert_fails_with(d, CannotResumeHost)
175175
176 def test_makeSlaveFromVitals(self):176 def test_makeWorkerFromVitals(self):
177 # Builder.slave is a BuilderWorker that points at the actual Builder.177 # BuilderInteractor.makeWorkerFromVitals returns a BuilderWorker
178 # The Builder is only ever used in scripts that run outside of the178 # that points at the actual Builder. The Builder is only ever used
179 # security context.179 # in scripts that run outside of the security context.
180 builder = MockBuilder(virtualized=False)180 builder = MockBuilder(virtualized=False)
181 vitals = extract_vitals_from_db(builder)181 vitals = extract_vitals_from_db(builder)
182 slave = BuilderInteractor.makeSlaveFromVitals(vitals)182 worker = BuilderInteractor.makeWorkerFromVitals(vitals)
183 self.assertEqual(builder.url, slave.url)183 self.assertEqual(builder.url, worker.url)
184 self.assertEqual(10, slave.timeout)184 self.assertEqual(10, worker.timeout)
185185
186 builder = MockBuilder(virtualized=True)186 builder = MockBuilder(virtualized=True)
187 vitals = extract_vitals_from_db(builder)187 vitals = extract_vitals_from_db(builder)
188 slave = BuilderInteractor.makeSlaveFromVitals(vitals)188 worker = BuilderInteractor.makeWorkerFromVitals(vitals)
189 self.assertEqual(5, slave.timeout)189 self.assertEqual(5, worker.timeout)
190190
191191
192class TestBuilderInteractorCleanSlave(TestCase):192class TestBuilderInteractorCleanWorker(TestCase):
193193
194 run_tests_with = AsynchronousDeferredRunTest194 run_tests_with = AsynchronousDeferredRunTest
195195
196 @defer.inlineCallbacks196 @defer.inlineCallbacks
197 def assertCleanCalls(self, builder, worker, calls, done):197 def assertCleanCalls(self, builder, worker, calls, done):
198 actually_done = yield BuilderInteractor.cleanSlave(198 actually_done = yield BuilderInteractor.cleanWorker(
199 extract_vitals_from_db(builder), worker,199 extract_vitals_from_db(builder), worker,
200 MockBuilderFactory(builder, None))200 MockBuilderFactory(builder, None))
201 self.assertEqual(done, actually_done)201 self.assertEqual(done, actually_done)
@@ -243,7 +243,7 @@ class TestBuilderInteractorCleanSlave(TestCase):
243 builder.vm_reset_protocol = None243 builder.vm_reset_protocol = None
244 with ExpectedException(244 with ExpectedException(
245 CannotResumeHost, "Invalid vm_reset_protocol: None"):245 CannotResumeHost, "Invalid vm_reset_protocol: None"):
246 yield BuilderInteractor.cleanSlave(246 yield BuilderInteractor.cleanWorker(
247 extract_vitals_from_db(builder), OkWorker(),247 extract_vitals_from_db(builder), OkWorker(),
248 MockBuilderFactory(builder, None))248 MockBuilderFactory(builder, None))
249249
@@ -290,7 +290,7 @@ class TestBuilderInteractorCleanSlave(TestCase):
290 vitals = extract_vitals_from_db(builder)290 vitals = extract_vitals_from_db(builder)
291 worker = LostBuildingBrokenWorker()291 worker = LostBuildingBrokenWorker()
292 try:292 try:
293 yield BuilderInteractor.cleanSlave(293 yield BuilderInteractor.cleanWorker(
294 vitals, worker, MockBuilderFactory(builder, None))294 vitals, worker, MockBuilderFactory(builder, None))
295 except xmlrpc.client.Fault:295 except xmlrpc.client.Fault:
296 self.assertEqual(['status', 'abort'], worker.call_log)296 self.assertEqual(['status', 'abort'], worker.call_log)
@@ -470,8 +470,8 @@ class TestBuilderInteractorDB(TestCaseWithFactory):
470 return d.addCallback(check_build_started)470 return d.addCallback(check_build_started)
471471
472 @defer.inlineCallbacks472 @defer.inlineCallbacks
473 def test_findAndStartJob_requires_clean_slave(self):473 def test_findAndStartJob_requires_clean_worker(self):
474 # findAndStartJob ensures that its slave starts CLEAN.474 # findAndStartJob ensures that its worker starts CLEAN.
475 builder, build = self._setupBinaryBuildAndBuilder()475 builder, build = self._setupBinaryBuildAndBuilder()
476 builder.setCleanStatus(BuilderCleanStatus.DIRTY)476 builder.setCleanStatus(BuilderCleanStatus.DIRTY)
477 candidate = build.queueBuild()477 candidate = build.queueBuild()
@@ -480,12 +480,12 @@ class TestBuilderInteractorDB(TestCaseWithFactory):
480 vitals = extract_vitals_from_db(builder)480 vitals = extract_vitals_from_db(builder)
481 with ExpectedException(481 with ExpectedException(
482 BuildDaemonIsolationError,482 BuildDaemonIsolationError,
483 "Attempted to start build on a dirty slave."):483 "Attempted to start build on a dirty worker."):
484 yield BuilderInteractor.findAndStartJob(484 yield BuilderInteractor.findAndStartJob(
485 vitals, builder, OkWorker(), builder_factory)485 vitals, builder, OkWorker(), builder_factory)
486486
487 @defer.inlineCallbacks487 @defer.inlineCallbacks
488 def test_findAndStartJob_dirties_slave(self):488 def test_findAndStartJob_dirties_worker(self):
489 # findAndStartJob marks its builder DIRTY before dispatching.489 # findAndStartJob marks its builder DIRTY before dispatching.
490 builder, build = self._setupBinaryBuildAndBuilder()490 builder, build = self._setupBinaryBuildAndBuilder()
491 candidate = build.queueBuild()491 candidate = build.queueBuild()
diff --git a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
index 89f8474..73bff8d 100644
--- a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
+++ b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
@@ -615,7 +615,7 @@ class TestBinaryBuildPackageBehaviourBuildCollection(TestCaseWithFactory):
615 # The builder is in the process of aborting.615 # The builder is in the process of aborting.
616 def got_update(ignored):616 def got_update(ignored):
617 self.assertEqual(617 self.assertEqual(
618 "Waiting for slave process to be terminated",618 "Waiting for worker process to be terminated",
619 self.candidate.logtail)619 self.candidate.logtail)
620620
621 d = self.updateBuild(self.candidate, AbortingWorker())621 d = self.updateBuild(self.candidate, AbortingWorker())

Subscribers

People subscribed via source and target branches

to status/vote changes: