Merge lp:~rockstar/launchpad/branch-scanner-prep into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Approved by: | Tim Penhey on 2010-01-06 |
| Approved revision: | not available |
| Merged at revision: | not available |
| Proposed branch: | lp:~rockstar/launchpad/branch-scanner-prep |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
157 lines (+97/-0) 3 files modified
database/schema/security.cfg (+2/-0) lib/canonical/launchpad/scripts/garbo.py (+35/-0) lib/canonical/launchpad/scripts/tests/test_garbo.py (+60/-0) |
| To merge this branch: | bzr merge lp:~rockstar/launchpad/branch-scanner-prep |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Penhey (community) | Approve on 2010-01-06 | ||
| Edwin Grubbs | 2009-12-16 | Pending | |
|
Review via email:
|
|||
| Paul Hummer (rockstar) wrote : | # |
| Tim Penhey (thumper) wrote : | # |
Hi Paul,
I think the job pruner should be altered somewhat.
At the very least it will fail now as there are more than just branch jobs.
Also we may want to be a little more selective in the deletion and not delete
pending jobs.
If we just have a BranchJob pruner for now, we won't be enforcing our rules on
other jobs.
review needs-fixing
| Tim Penhey (thumper) wrote : | # |
Hi Paul,
You should really add a test to make sure that branch jobs that are less than 30 days old are not deleted.
Also it seems weird that you set the date to 30 days, and the sql expects < 30 days, not <=. Is there a commit somewhere? That should at least be commented.
| Tim Penhey (thumper) wrote : | # |
Why do you create an actual tree? Surely this isn't needed to test that the job isn't deleted.
| Tim Penhey (thumper) wrote : | # |
You no longer need tempfile, and you are missing comments on your test methods.
You also have two lines between your tests, and only one at the end, c.f. PEP-8.

Hi Edwin-
This branch adds a JobPruner to the daily garbo script. It removes any jobs
that have a date_finished of more than thirty days. This is needed for the
next few branches that turn the scanner into a job. If we didn't do this, the
job table would get out of hand really quick.
To test, do: launchpad. scripts. tests.test_ garbo \ test_JobPruner
bin/test -vvc canonical.
TestGarbo.
reviewer edwin-grubbs
Cheers,
Paul