Merge lp://staging/~wgrant/launchpad/bug-549340-fix-buildqueue-destruction into lp://staging/launchpad

Proposed by William Grant
Status: Rejected
Rejected by: Michael Nelson
Proposed branch: lp://staging/~wgrant/launchpad/bug-549340-fix-buildqueue-destruction
Merge into: lp://staging/launchpad
Prerequisite: lp://staging/~wgrant/launchpad/refactor-slavestatus
Diff against target: 152 lines (+52/-2)
7 files modified
database/schema/security.cfg (+1/-1)
lib/lp/buildmaster/model/buildqueue.py (+1/-1)
lib/lp/code/model/sourcepackagerecipebuild.py (+4/-0)
lib/lp/code/tests/test_sourcepackagerecipebuild.py (+18/-0)
lib/lp/soyuz/interfaces/buildfarmbuildjob.py (+6/-0)
lib/lp/soyuz/model/buildpackagejob.py (+5/-0)
lib/lp/translations/tests/test_translationtemplatesbuildjob.py (+17/-0)
To merge this branch: bzr merge lp://staging/~wgrant/launchpad/bug-549340-fix-buildqueue-destruction
Reviewer Review Type Date Requested Status
Julian Edwards (community) Disapprove
Review via email: mp+22286@code.staging.launchpad.net

Commit message

Fix destruction of translation template build farm jobs.

Description of the change

This branch fixes BuildQueue.destroySelf to not assume that IBuildFarmJobs are Storm objects. TranslationTemplatesBuildJob isn't -- its DB object is actually a BranchJob.

I've replaced the direct store removal with a call to IBFJ.destroySelf, and implemented it on the two classes that needed it. It actually lives on IBuildFarmBuildJob for now, since TTBJ has security declarations for both IBuildFarmJob and IBranchJob, the latter already defining destroySelf -- this results in a Zope permission definition conflict, even though the permissions are actually the same.

I've also added tests for destruction of TTBJ and SPRBJ BuildQueues. That required the granting of DELETE on SPRBJ to launchpad_main.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

I do not like this fix, we should not be adding more SQLObject methods. Instead, there should be a real TranslationTemplatesBuildJob table so that build history is preserved.

I'm a bit flummoxed as to how its DB object is a BranchJob?

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.