Merge lp://staging/~julian-edwards/launchpad/cancel-build-bug-173018-part2 into lp://staging/launchpad
Proposed by
Julian Edwards
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14220 | ||||
Proposed branch: | lp://staging/~julian-edwards/launchpad/cancel-build-bug-173018-part2 | ||||
Merge into: | lp://staging/launchpad | ||||
Prerequisite: | lp://staging/~julian-edwards/launchpad/cancel-build-bug-173018 | ||||
Diff against target: |
305 lines (+163/-20) 4 files modified
lib/lp/app/browser/tales.py (+2/-0) lib/lp/buildmaster/manager.py (+45/-14) lib/lp/buildmaster/model/buildfarmjob.py (+4/-1) lib/lp/buildmaster/tests/test_manager.py (+112/-5) |
||||
To merge this branch: | bzr merge lp://staging/~julian-edwards/launchpad/cancel-build-bug-173018-part2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+80662@code.staging.launchpad.net |
Commit message
[r=bac][bug=173018] Alter the buildd-manager to notice that a build state is CANCELLING, and rip it forcefully off the builder by resetting the virtual machine.
Description of the change
Second branch in a pipeline of changes to add mid-build cancellation on the build farm. This one fixes the buildd-manager to notice that build states are CANCELLING just before it tries to check an active build and rips it forcefully off the builder by resetting the virtual machine. (hence it only works on virtual builders)
Most of the branch is tests, the actual fix is easy.
To post a comment you must log in.
Hi Julian,
Nice branch and tests.
I notice in your tests there is an inconsistency whether you 'return d' or not. It is unclear to me that it is necessary. Could you take a pass and see if it is required?
Also, in these tests the lambda can be eliminated:
d.addCallback( lambda result: self.assertFals e(result) )
can be
d.addCallback( self.assertFals e)
Is there a reason to prefer the wordier pattern?
In general the tests are non-trivial but well structured and easy to follow!