[07:32] morning all [07:34] morning Tom [07:37] o/ [07:37] worst thing about emptying my office is having to reset my office chair again [07:43] oh... are you moving back in the office today ? [07:48] yep [07:48] all set up again, just got no shelves or pictures up yet [07:50] :) wow that was fast! [07:51] we started decorating this room on Saturday :) [07:51] been doing the lounge and the office alternately waiting for things to dry, etc [07:52] u guys should definitely come visit (our office needs a lot of TLC) :D [07:52] hah, this is my decorating allocation for the year [07:52] lol [07:52] I'm not doing any more after this! [07:52] :) [07:52] It's mostly just to remove the wallpaper from the previous owners [07:53] right, yeah.. that makes sense [09:38] * ilasc now loves Storm Vocabularies [09:38] but as cool as they are, they don't yet implement the telepathy feature - only thinking I'm gonna need you to behave this way for tokens with a certain structure doesn't mean the Vocabulary actually will unless you code that in... [09:38] :) they're nice once you get your head around them [09:38] agreed, yes [09:41] back in 10 mins, need to remove a radiator. [09:57] and back [09:57] turns out double radiators hold a surprising amount of water, there was panicking [09:58] I have that every damn time I try to unclog a washing machine filter [09:59] yeah, the feeling of 'this pipe is only 3 feet long, how has it produced 40 litres of water'? [10:04] * cjwatson tries to work out how process-job-source interacts with dbuser [10:05] I think I've tried and failed at that [10:05] cjwatson: distribution API tests are in doctests, I need to add a new test for searchOCIProjects. Is it worth adding a new doctest, or creating a new unit test case for it? [10:05] I think I prefer the latter on the grounds of 'ergh, doctests' [10:06] New unit test if that isn't too painful [10:06] sure [10:06] * tomwardill attempts the thing [10:06] I've been known to add more stuff to an existing doctest when it was just too much work to get the necessary infrastructure set up [10:08] tomwardill: but also, lp.registry.tests.test_distribution.TestWebService exists, although it's a bit weirdly-named and uses the slow launchpadlib test glue [10:08] oh, so it does! missed that [10:09] tomwardill: maybe a preliminary patch to port that off AppServerLayer/launchpadlib, and then add to it? [10:09] cjwatson: I was just about to suggest the same, but reversed [10:09] (do this one first, then transcribe the existing tests into it) [10:11] Wouldn't be my preference, but either way works [10:27] Hm. process-job-source demonstrably does manage to set the dbuser. But how? [10:27] To the pdbmobile [10:42] Aha, of course, it uses the generic script startup code [10:45] pappacena: can you look over https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/383157 again now I've added a test :) [10:45] (first time writing an api test like that) [11:43] nicely done tomwardill, never seen an api test like until now either [11:45] ilasc: I was just copying pappacena's work with the OCIRecipe API :) [11:45] :) [12:08] Could I have reviews of https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383183 and https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383184 please? Simple preliminary py3 stuff [12:09] wgrant: Roughly how risky do you think it might be to extend process-job-source to be able to run multiple job sources with different dbusers? (This is at the root of why process-job-source-groups spams lots of different expensive subprocesses.) We have code that should be able to do the store reconnection work, but AFAIK using it is unprecedented outside the test suite. [12:10] OTOH it seems to work very well in the test suite. [12:12] cjwatson: Doesn't celery do it? [12:13] I don't actually know how [12:13] Since switch_dbuser is IIRC in lp.testing [12:15] task_init it seems [12:16] Looks like it assumes a single store [12:16] Maybe that would be OK here too [12:17] transaction.abort(); store = IStore(Job); getUtility(IZStorm).remove(store); store.close(); dbconfig.override(dbuser=dbuser, isolation_level='read_committed') [12:17] Ah right [12:17] Will invalidate all objects, I guess. [12:17] Not invalidate but rather break [12:18] Probably OK between job sources - there'll be no cache either so they'll get new objects [12:18] Assuming the top level is sensible [12:19] I might be inclined to extract that bit from task_init to somewhere else and put a bit more caution and docstringery around it [12:20] I started writing code in process-job-source to run multiple job sources as long as they have compatible dbuser, but it's kind of ugly and annoying and doesn't help nearly as much as doing actual dbuser switching would [12:20] Yep, I don't think that really makes sense. [13:50] pappacena: hold a minute on https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/383094 - I have a few comments based on the screenshot, looking through the diff now [13:51] Ok! I was not planning to merge it right now [13:51] landing https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/383157 [13:52] * pappacena ok! [14:14] pappacena: all right, commented now :) [14:16] Thanks, cjwatson! I'll adjust accordingly [15:01] Another few buildd py3 patches: https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383219 https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383222 https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383224 [15:02] * pappacena I'll check [15:18] * pappacena done! [15:19] do we have a prefered way to JSON a DateTime (for a named_get operation) [15:20] You mean on tests to check the returned JSON value? [15:20] oh, it may not need to be JSON, just a quoted string, according to this other test I've found [15:21] pappacena: no, to use a datetime as an argument to a named_get call [15:21] Yes... I guess it's using datetime_object.isoformat() [15:21] that would make sense [15:22] * pappacena I'm not 100% sure about it, tho [15:27] .isoformat() is fairly usual, yes [15:28] See lazr.restfulclient._json.DatetimeJSONEncoder [15:29] Or indeed lp.services.webapp.batching.DateTimeJSONEncoder which seems to be a near-copy [15:31] test transcribing for better webservice tests: https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/383228 [15:37] tomwardill: Can you check whether the transaction.commit calls are necessary? They can often be removed as part of this sort of work, since the webservice calls are now in-process [15:37] ah, right [15:37] checking [15:37] (And removing them speeds things up, if it can be done) [15:42] cjwatson: it does not need them, so removed and tidied imports [15:45] tomwardill: r=me, thanks [15:46] ta, landing [16:39] pappacena: I'm doing some trello farming, is the asyncRequestbuilds work all landed? [17:21] Sorry for the delay... I went for lunch after the all-hands. [17:21] Yes, it is landed, Tom. Thanks for cleaning up Trello