/srv/irclogs.ubuntu.com/2020/04/30/#launchpad-dev.txt

tomwardillmorning all07:32
ilascmorning Tom07:34
tomwardillo/07:37
tomwardillworst thing about emptying my office is having to reset my office chair again07:37
ilascoh... are you moving back in the office today ?07:43
tomwardillyep07:48
tomwardillall set up again, just got no shelves or pictures up yet07:48
ilasc:) wow that was fast!07:50
tomwardillwe started decorating this room on Saturday :)07:51
tomwardillbeen doing the lounge and the office alternately waiting for things to dry, etc07:51
ilascu guys should definitely come visit (our office needs a lot of TLC) :D07:52
tomwardillhah, this is my decorating allocation for the year07:52
ilasclol07:52
tomwardillI'm not doing any more after this!07:52
ilasc:)07:52
tomwardillIt's mostly just to remove the wallpaper from the previous owners07:52
ilascright, yeah.. that makes sense07:53
* ilasc now loves Storm Vocabularies 09:38
ilascbut 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 them09:38
ilascagreed, yes09:38
tomwardillback in 10 mins, need to remove a radiator.09:41
tomwardilland back09:57
tomwardillturns out double radiators hold a surprising amount of water, there was panicking09:57
cjwatsonI have that every damn time I try to unclog a washing machine filter09:58
tomwardillyeah, the feeling of 'this pipe is only 3 feet long, how has it produced 40 litres of water'?09:59
* cjwatson tries to work out how process-job-source interacts with dbuser10:04
tomwardillI think I've tried and failed at that10:05
tomwardillcjwatson: 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
tomwardillI think I prefer the latter on the grounds of 'ergh, doctests'10:05
cjwatsonNew unit test if that isn't too painful10:06
tomwardillsure10:06
* tomwardill attempts the thing10:06
cjwatsonI've been known to add more stuff to an existing doctest when it was just too much work to get the necessary infrastructure set up10:06
cjwatsontomwardill: but also, lp.registry.tests.test_distribution.TestWebService exists, although it's a bit weirdly-named and uses the slow launchpadlib test glue10:08
tomwardilloh, so it does! missed that10:08
cjwatsontomwardill: maybe a preliminary patch to port that off AppServerLayer/launchpadlib, and then add to it?10:09
tomwardillcjwatson: I was just about to suggest the same, but reversed10:09
tomwardill(do this one first, then transcribe the existing tests into it)10:09
cjwatsonWouldn't be my preference, but either way works10:11
cjwatsonHm.  process-job-source demonstrably does manage to set the dbuser.  But how?10:27
cjwatsonTo the pdbmobile10:27
cjwatsonAha, of course, it uses the generic script startup code10:42
tomwardillpappacena: 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)10:45
ilascnicely done tomwardill, never seen an api test like until now either11:43
tomwardillilasc: I was just copying pappacena's work with the OCIRecipe API :)11:45
ilasc:)11:45
cjwatsonCould 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 stuff12:08
cjwatsonwgrant: 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:09
cjwatsonOTOH it seems to work very well in the test suite.12:10
wgrantcjwatson: Doesn't celery do it?12:12
wgrantI don't actually know how12:13
wgrantSince switch_dbuser is IIRC in lp.testing12:13
cjwatsontask_init it seems12:15
cjwatsonLooks like it assumes a single store12:16
cjwatsonMaybe that would be OK here too12:16
cjwatsontransaction.abort(); store = IStore(Job); getUtility(IZStorm).remove(store); store.close(); dbconfig.override(dbuser=dbuser, isolation_level='read_committed')12:17
wgrantAh right12:17
wgrantWill invalidate all objects, I guess.12:17
wgrantNot invalidate but rather break12:17
cjwatsonProbably OK between job sources - there'll be no cache either so they'll get new objects12:18
cjwatsonAssuming the top level is sensible12:18
cjwatsonI might be inclined to extract that bit from task_init to somewhere else and put a bit more caution and docstringery around it12:19
cjwatsonI 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 would12:20
wgrantYep, I don't think that really makes sense.12:20
cjwatsonpappacena: 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 now13:50
pappacenaOk! I was not planning to merge it right now13:51
tomwardilllanding https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/38315713:51
* pappacena ok!13:52
cjwatsonpappacena: all right, commented now :)14:14
pappacenaThanks, cjwatson! I'll adjust accordingly14:16
cjwatsonAnother 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/38322415:01
* pappacena I'll check15:02
* pappacena done!15:18
tomwardilldo we have a prefered way to JSON a DateTime (for a named_get operation)15:19
pappacenaYou mean on tests to check the returned JSON value?15:20
tomwardilloh, it may not need to be JSON, just a quoted string, according to this other test I've found15:20
tomwardillpappacena: no, to use a datetime as an argument to a named_get call15:21
pappacenaYes... I guess it's using datetime_object.isoformat()15:21
tomwardillthat would make sense15:21
* pappacena I'm not 100% sure about it, tho15:22
cjwatson.isoformat() is fairly usual, yes15:27
cjwatsonSee lazr.restfulclient._json.DatetimeJSONEncoder15:28
cjwatsonOr indeed lp.services.webapp.batching.DateTimeJSONEncoder which seems to be a near-copy15:29
tomwardilltest transcribing for better webservice tests: https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/38322815:31
cjwatsontomwardill: 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-process15:37
tomwardillah, right15:37
tomwardillchecking15:37
cjwatson(And removing them speeds things up, if it can be done)15:37
tomwardillcjwatson: it does not need them, so removed and tidied imports15:42
cjwatsontomwardill: r=me, thanks15:45
tomwardillta, landing15:46
tomwardillpappacena: I'm doing some trello farming, is the asyncRequestbuilds work all landed?16:39
pappacenaSorry for the delay... I went for lunch after the all-hands.17:21
pappacenaYes, it is landed, Tom. Thanks for cleaning up Trello17:21

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!