Merge lp:~jtv/launchpad/katie-and-gina-are-bad-bad-girls into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Jeroen T. Vermeulen on 2011-09-15 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 13965 | ||||
| Proposed branch: | lp:~jtv/launchpad/katie-and-gina-are-bad-bad-girls | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
655 lines (+75/-290) 4 files modified
lib/lp/soyuz/scripts/gina/handlers.py (+9/-12) lib/lp/soyuz/scripts/gina/katie.py (+0/-136) lib/lp/soyuz/scripts/gina/packages.py (+48/-88) scripts/gina.py (+18/-54) |
||||
| To merge this branch: | bzr merge lp:~jtv/launchpad/katie-and-gina-are-bad-bad-girls | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gavin Panella (community) | 2011-09-15 | Approve on 2011-09-15 | |
|
Review via email:
|
|||
Commit Message
[r=allenap][bug=850926] Katie/Gina cleanup.
Description of the Change
= Summary =
Katie and Gina are a bit of a mess. Very old code, basically unmaintained for years, full of sometimes puzzling XXX comments by people who no longer work here.
== Proposed fix ==
Remove some unneeded functions, parameters etc. Oh yes, and this revealed that the katie module was not only unclear and untested, it was unneeded as well.
Gina could do with more cleanups that will reverberate throughout the module. For example, it would help to look up the relevant distroseries once and pass that around, rather than passing distro and series name and expect every callee to look it up for themselves.
== Pre-implementation notes ==
We may be able to ditch the Katie database as well. The Katie celebrity may be slightly harder to get rid of, because Translations uses it as a special person to recognize items produced by a particular internal process.
We'll also want much more fine-grained transaction management in gina. It could run for far too long without committing its changes, and as far as I can see, without good reason. The code will behave fine if restarted after an abortive run that committed only a portion of its changes; it's integral to the design of incremental imports.
== Implementation details ==
I removed the bit in SourcePackageData that handles an Uploaders key in an incoming file and sets self.uploaders. I can do that because nothing references the value, and there is a catch-all (a dubious one though—need to look into that as well) that will naturally do the right thing for this item. It just won't parse the field, which is fine by me.
== Tests ==
{{{
./bin/test -vvc lp.soyuz -t katie -t gina
}}}
== Demo and Q/A ==
We can do this on dogfood; we have some experience running gina now. Run the old gina (“./scripts/gina.py -v sid”). Record resulting SourcePackagePu
This is not a very complete test, but since this is not a functional change, the main worry is something blowing up because of, for example, an incorrect argument count.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
scripts/gina.py
lib/lp/
./scripts/gina.py
25: '_pythonpath' imported but unused
| Jeroen T. Vermeulen (jtv) wrote : | # |
| Gavin Panella (allenap) wrote : | # |
Looks good. There is also a katie_dbname configuration parameter in schema-lazr.conf that ought to be removed.
| Jeroen T. Vermeulen (jtv) wrote : | # |
Thanks. Removing that config key will have to be a separate bug, since removing a lazr config key is horribly dangerous until it has disappeared from the codebase on all production systems.
| Jeroen T. Vermeulen (jtv) wrote : | # |
Reported that as bug 850921.

William just tells me that the Katie celebrity is in fact a completely different Katie. So this cleanup will help clear that up as well.