[07:32] <tomwardill> morning all
[07:34] <ilasc> morning Tom
[07:37] <tomwardill> o/
[07:37] <tomwardill> worst thing about emptying my office is having to reset my office chair again
[07:43] <ilasc> oh... are you moving back in the office today ?
[07:48] <tomwardill> yep
[07:48] <tomwardill> all set up again, just got no shelves or pictures up yet
[07:50] <ilasc> :) wow that was fast!
[07:51] <tomwardill> we started decorating this room on Saturday :)
[07:51] <tomwardill> been doing the lounge and the office alternately waiting for things to dry, etc
[07:52] <ilasc> u guys should definitely come visit (our office needs a lot of TLC) :D
[07:52] <tomwardill> hah, this is my decorating allocation for the year
[07:52] <ilasc> lol
[07:52] <tomwardill> I'm not doing any more after this!
[07:52] <ilasc> :)
[07:52] <tomwardill> It's mostly just to remove the wallpaper from the previous owners
[07:53] <ilasc> right, yeah.. that makes sense
[09:38]  * ilasc now loves Storm Vocabularies 
[09:38] <ilasc> 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] <cjwatson> :) they're nice once you get your head around them
[09:38] <ilasc> agreed, yes
[09:41] <tomwardill> back in 10 mins, need to remove a radiator.
[09:57] <tomwardill> and back
[09:57] <tomwardill> turns out double radiators hold a surprising amount of water, there was panicking
[09:58] <cjwatson> I have that every damn time I try to unclog a washing machine filter
[09:59] <tomwardill> 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] <tomwardill> I think I've tried and failed at that
[10:05] <tomwardill> 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] <tomwardill> I think I prefer the latter on the grounds of 'ergh, doctests'
[10:06] <cjwatson> New unit test if that isn't too painful
[10:06] <tomwardill> sure
[10:06]  * tomwardill attempts the thing
[10:06] <cjwatson> 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] <cjwatson> 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] <tomwardill> oh, so it does! missed that
[10:09] <cjwatson> tomwardill: maybe a preliminary patch to port that off AppServerLayer/launchpadlib, and then add to it?
[10:09] <tomwardill> cjwatson: I was just about to suggest the same, but reversed
[10:09] <tomwardill> (do this one first, then transcribe the existing tests into it)
[10:11] <cjwatson> Wouldn't be my preference, but either way works
[10:27] <cjwatson> Hm.  process-job-source demonstrably does manage to set the dbuser.  But how?
[10:27] <cjwatson> To the pdbmobile
[10:42] <cjwatson> Aha, of course, it uses the generic script startup code
[10:45] <tomwardill> pappacena: can you look over https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/383157 again now I've added a test :)
[10:45] <tomwardill> (first time writing an api test like that)
[11:43] <ilasc> nicely done tomwardill, never seen an api test like until now either
[11:45] <tomwardill> ilasc: I was just copying pappacena's work with the OCIRecipe API :)
[11:45] <ilasc> :)
[12:08] <cjwatson> 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] <cjwatson> 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] <cjwatson> OTOH it seems to work very well in the test suite.
[12:12] <wgrant> cjwatson: Doesn't celery do it?
[12:13] <wgrant> I don't actually know how
[12:13] <wgrant> Since switch_dbuser is IIRC in lp.testing
[12:15] <cjwatson> task_init it seems
[12:16] <cjwatson> Looks like it assumes a single store
[12:16] <cjwatson> Maybe that would be OK here too
[12:17] <cjwatson> transaction.abort(); store = IStore(Job); getUtility(IZStorm).remove(store); store.close(); dbconfig.override(dbuser=dbuser, isolation_level='read_committed')
[12:17] <wgrant> Ah right
[12:17] <wgrant> Will invalidate all objects, I guess.
[12:17] <wgrant> Not invalidate but rather break
[12:18] <cjwatson> Probably OK between job sources - there'll be no cache either so they'll get new objects
[12:18] <cjwatson> Assuming the top level is sensible
[12:19] <cjwatson> 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] <cjwatson> 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] <wgrant> Yep, I don't think that really makes sense.
[13:50] <cjwatson> 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] <pappacena> Ok! I was not planning to merge it right now
[13:51] <tomwardill> landing https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/383157
[13:52]  * pappacena ok!
[14:14] <cjwatson> pappacena: all right, commented now :)
[14:16] <pappacena> Thanks, cjwatson! I'll adjust accordingly
[15:01] <cjwatson> 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] <tomwardill> do we have a prefered way to JSON a DateTime (for a named_get operation)
[15:20] <pappacena> You mean on tests to check the returned JSON value?
[15:20] <tomwardill> oh, it may not need to be JSON, just a quoted string, according to this other test I've found
[15:21] <tomwardill> pappacena: no, to use a datetime as an argument to a named_get call
[15:21] <pappacena> Yes... I guess it's using datetime_object.isoformat()
[15:21] <tomwardill> that would make sense
[15:22]  * pappacena I'm not 100% sure about it, tho
[15:27] <cjwatson> .isoformat() is fairly usual, yes
[15:28] <cjwatson> See lazr.restfulclient._json.DatetimeJSONEncoder
[15:29] <cjwatson> Or indeed lp.services.webapp.batching.DateTimeJSONEncoder which seems to be a near-copy
[15:31] <tomwardill> test transcribing for better webservice tests: https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/383228
[15:37] <cjwatson> 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] <tomwardill> ah, right
[15:37] <tomwardill> checking
[15:37] <cjwatson> (And removing them speeds things up, if it can be done)
[15:42] <tomwardill> cjwatson: it does not need them, so removed and tidied imports
[15:45] <cjwatson> tomwardill: r=me, thanks
[15:46] <tomwardill> ta, landing
[16:39] <tomwardill> pappacena: I'm doing some trello farming, is the asyncRequestbuilds work all landed?
[17:21] <pappacena> Sorry for the delay... I went for lunch after the all-hands.
[17:21] <pappacena> Yes, it is landed, Tom. Thanks for cleaning up Trello