Merge lp://qastaging/~mbp/launchpad/884997-rusage into lp://qastaging/launchpad

Proposed by Martin Pool
Status: Merged
Approved by: Martin Pool
Approved revision: no longer in the source branch.
Merged at revision: 14240
Proposed branch: lp://qastaging/~mbp/launchpad/884997-rusage
Merge into: lp://qastaging/launchpad
Prerequisite: lp://qastaging/~mbp/launchpad/884092-buildd-versions
Diff against target: 56 lines (+17/-3)
2 files modified
lib/canonical/buildd/buildrecipe (+16/-2)
lib/canonical/buildd/sourcepackagerecipe.py (+1/-1)
To merge this branch: bzr merge lp://qastaging/~mbp/launchpad/884997-rusage
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+80971@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2011-11-02.

Commit message

[r=jelmer][bug=884997] report rusage from buildrecipe

Description of the change

This makes buildrecipe log the rusage of bzr dailydeb which will let us see how close to the edge we are wrt memory.

It also fixes some confusing code whereby the argv[0] of buildrecipe is buildrecipe.py.

I have tested this manually by calling in to this code from a python shell. I would like to write an automatic test but it's a little bit hard because this is a script not a module, and I'm concerned that renaming it will break things in the complicated deployment process. Advice on whether to try or not welcome.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> I have tested this manually by calling in to this code from a python shell. I would like to write an automatic test but it's a little bit hard because this is a script not a module, and I'm concerned that renaming it will break things in the complicated deployment process. Advice on whether to try or not welcome.

I agree it would be nice to have tests for this - and the same goes for some of the other bits of launchpad-buildd.

There is only one bit of code that really calls buildrecipe, so as long as we make sure that that keeps working and don't change much else I don't think it would be very risky to move it into a module.

There was talk about splitting launchpad-buildd off into a separate branch, rather than having it be a part of the main Launchpad source tree. If tests are going to be added they should probably be added in such a way that they don't rely on parts of the Launchpad tree outside of lib/canonical/buildd.

Revision history for this message
Martin Pool (mbp) wrote :

I think you're right - I can probably fairly safely rename this,
update the code that calls it, and then import just that single module
for testing.

Revision history for this message
Martin Pool (mbp) wrote :

On the whole I think I will land this, and then separately do a branch or set of branches that split this out in to a new tree. The split out is mostly covered by bug 800295.

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.