← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/destroy-lots-of-db-cruft into lp:launchpad

 

The proposal to merge lp:~wgrant/launchpad/destroy-lots-of-db-cruft into lp:launchpad has been updated.

Description changed to:

Continuing on from <https://code.launchpad.net/~wgrant/launchpad/deprecated-functions-are-bad/+merge/74225>, this branch removes canonical.lp's internal DB config storage and generally paves the way to storing the DB config in one place: config.database.rw_main_master.

canonical.lp is now left as a pretty pathetic wrapper around ZTM. I haven't yet worked out what I'm going to do about the dbconfig.dbuser default, but it can stay like this for now (ec2 likes it, at least). This does mean that -U and initZopeless will interact badly, but no script seems to use both db_options() and initZopeless(). The next branch in the series cleans that area up and adds assertions to ensure conflicts are detected.

I also deleted some obsolete cruft that would have needed reworking otherwise.

Only significant behavioural change is the elimination of the long-deprecated LP_DB* override envvars.

16:13:09 < wgrant> But all the other crap is no longer used except by canonical.launchpad.scripts.db_options, and I hope to eliminate that in a sec by 
                   removing the LP_DB* envvars.
16:17:08 < wgrant> stub: Those envvars are pretty dead, right? :)
16:17:16 < wgrant> Since we have universal script args now.
16:18:23 < stub> wgrant: Yes. They sometimes get used, but we should be able to use the PG* env vars or the db_options helper for those rare cases.
16:18:31 < wgrant> Yup.
16:18:46 < wgrant> db_options is pretty handy.
16:19:11 < stub> All the times they were used recently I think were for work arounds, stuff like accessing a DB on a non-standard port.
16:19:24 < wgrant> Which is now fixed.
16:19:30 < wgrant> And PGPORT worked for anyway, IIRC.
16:19:34 < stub> twice :-)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/destroy-lots-of-db-cruft/+merge/74233
-- 
https://code.launchpad.net/~wgrant/launchpad/destroy-lots-of-db-cruft/+merge/74233
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/destroy-lots-of-db-cruft into lp:launchpad.


References