Merge lp:~michael.nelson/launchpad/527617_aborted_build_job into lp:launchpad

Proposed by Michael Nelson
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~michael.nelson/launchpad/527617_aborted_build_job
Merge into: lp:launchpad
Diff against target: 31 lines (+4/-2)
2 files modified
lib/lp/buildmaster/model/packagebuildfarmjob.py (+1/-1)
lib/lp/soyuz/doc/buildd-slavescanner.txt (+3/-1)
To merge this branch: bzr merge lp:~michael.nelson/launchpad/527617_aborted_build_job
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+20968@code.launchpad.net

Commit message

Aborting a build job sets the buildstate to NEEDSBUILD rather than BUILDING.

Description of the change

This simple fix ensures that when a build job is aborted, the buildstate of the build is set to NEEDSBUILD.

The documentation test always stated: "ABORTED -> builder was aborted, release builder and reset job for the next build round", but the state of the actual build was never included in the test.

This bug seems to be the cause of bug 499421 and bug 527617.

I tried to chase this change back to find where it was introduced, but it goes way back past 2006 (being moved from one file to the next in various refactorings, I stopped at `bzr diff -c 3691.93.27`).

To test:
bin/test -t doc/buildd-slavescanner.txt

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) wrote :

Approved, with the reviewer agog at the simplicity.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/buildmaster/model/packagebuildfarmjob.py'
--- lib/lp/buildmaster/model/packagebuildfarmjob.py 2010-01-20 04:14:23 +0000
+++ lib/lp/buildmaster/model/packagebuildfarmjob.py 2010-03-09 15:13:25 +0000
@@ -27,4 +27,4 @@
2727
28 def jobAborted(self):28 def jobAborted(self):
29 """See `IBuildFarmJob`."""29 """See `IBuildFarmJob`."""
30 self.build.buildstate = BuildStatus.BUILDING30 self.build.buildstate = BuildStatus.NEEDSBUILD
3131
=== modified file 'lib/lp/soyuz/doc/buildd-slavescanner.txt'
--- lib/lp/soyuz/doc/buildd-slavescanner.txt 2010-03-08 17:43:41 +0000
+++ lib/lp/soyuz/doc/buildd-slavescanner.txt 2010-03-09 15:13:25 +0000
@@ -404,6 +404,8 @@
404 >>> a_builder.updateBuild(bqItem8)404 >>> a_builder.updateBuild(bqItem8)
405 >>> bqItem8.builder is None405 >>> bqItem8.builder is None
406 True406 True
407 >>> print bqItem8.specific_job.build.buildstate.name
408 NEEDSBUILD
407409
408Cleanup in preparation for the next test:410Cleanup in preparation for the next test:
409411
@@ -496,7 +498,7 @@
496 ...498 ...
497 X-Launchpad-Build-State: FAILEDTOUPLOAD499 X-Launchpad-Build-State: FAILEDTOUPLOAD
498 ...500 ...
499 * Build Log: http://launchpad.dev/.../buildlog_ubuntu-hoary-i386.mozilla-firefox_0.9_BUILDING.txt.gz501 * Build Log: http://.../...i386.mozilla-firefox_0.9_NEEDSBUILD.txt.gz
500 ...502 ...
501 Upload log:503 Upload log:
502 INFO creating lockfile504 INFO creating lockfile