/srv/irclogs.ubuntu.com/2015/02/25/#launchpad-dev.txt

cjwatsonwgrant: "We only need to keep domain-specific methods on the Registry objects for API purposes" - do we even need that if we have a git_service or something like that that is itself exposed on the API, like sharing_service?11:54
cjwatsonCreating all the infrastructure for a new service to avoid domain-specific registry methods only to add domain-specific shims to registry doesn't seem to gain an awful lot, but it would be more productive if we could avoid the shims altogether.11:55
wgrantcjwatson: Right, I mean more for historical reasons.11:58
cjwatsonOh, you mean the existing methods?  Right.11:58
wgrantIf you don't hate the sharing_service style of exposing a set of related operations elsewhere, by all means do so.11:59
wgrantI don't think it's pretty, but I think it's a lot better than having every method for everything ever on Person and Product.11:59
cjwatsonI'm not wild about it, I think it's potentially hard to find.11:59
cjwatsonBut as you say.11:59
cjwatsonIt might be good if we had a "see also" on apidoc.11:59
wgrantIndeed.11:59
wgrantThough for git it may be more sensible.12:00
wgrantBecause the operations are more obviously interrelated.12:01
wgrantGit repositories have operations on them, but anything above the level of a git repository is on the single sharing service.12:01
cjwatsonYeah.  It'll take me a day or so to reorganise.12:02
cjwatson(But that's fine, I'd rather get it into roughly the right shape now.)12:02
wgrantYeah, I think this should end up OK, and shouldn't be too huge a change at this stage.12:03
wgrantAnd if we can get an API that looks nice without being inside Registry, I'll be pretty pleased.12:03
wgrantI did fix lazr.restful last year to make Person a bit less unmanageable (adapters can add their own methods), but the apidoc still lists them all together, even if the interfaces and implementation are in a separate class.12:04
wgrants/are/can be/12:04
wgrantThat was more for splitting existing stuff out without breaking compat, though.12:05
cjwatsonwgrant: Hm, so I think http://lpbuildbot.canonical.com/builders/lp-devel-precise/builds/346/steps/shell_9/logs/summary is all due to decorating Branch.recipes with preloading.  Would you prefer to allow branchscanner to see codeimport (which I can do in devel rather than db-devel, IIRC) or to pull the decoration up to BranchRecipeListingView?12:30
cjwatsonOr something else I haven't thought of.12:30
wgrantcjwatson: I knew it'd break some DB perms, but that's an impressive set of failures.12:32
wgrantI'd just update security.cfg in devel12:32
cjwatsonMaybe Branch could gain an undecorated equivalent of recipes just for use in bzrsync.12:32
cjwatsonSince all it needs to do is set recipe.is_stale12:33
wgrantThat's not a terrible idea, yeah.12:33
cjwatsonOr even markRecipesStale or similar12:35
cjwatsonLet's see12:35
cjwatsonwgrant: https://code.launchpad.net/~cjwatson/launchpad/recipe-timeouts/+merge/250913, if you're still alive?12:50
cjwatsonAll the failing/erroring tests now pass locally.12:50
wgrantHmm.12:51
wgrantNot a huge fan, but it'll work and isn't objectively uglier than the other options.12:51
cjwatsonBecause of the extra method?12:51
wgrantRight.12:52
cjwatsonI figured it was slightly better than leaving a potential performance bomb around for other users.12:53
cjwatsonwgrant: Thinking about it, rather than adding a new service, why don't I just put these operations directly on GitRepositorySet?  I'm already planning to expose that as /git_repositories on the API, so that would be more economical.13:29
cjwatsonAnd I already have a getDefaultRepository method there.13:31
wgrantTrue13:31
wgrantThat works.13:31
cjwatsonIndeed Product.getDefaultGitRepository calls it!  Not sure what I was thinking in not at least centralising the common code.13:32
cjwatson(in set)13:32
cjwatsonIt'll have to do its own permission checking, I suppose.13:33
wgrantSharingService has some precedent there.13:34
wgrantBut some of those would have needed custom privilege checks anyway.13:34
* wgrant sleeps.13:38
cjwatsonnight13:40
cjwatsonthanks for the help13:40
blrwgrant: cjwatson: starting to think it might be useful to have a pygit2 fixture library of some sort - could provide a dict of the desired repo state, number of refs, branches, remotes, commits etc to build a pygit2.Repository object21:05
blrwill push all of that into an api test helper, but might be useful to abstract it out further.21:07
wgrantYeah, we'll definitely want something like that.22:38
thomiwgrant: first pass SS is https://launchpadlibrarian.net/198750892/Screenshot%20from%202015-02-26%2012%3A09%3A37.png23:18
thomiwgrant: I guess the 'add a new address' is why we need new authentication for +editemails?23:18
wgrantthomi: right, you need to reauthenticate to change your authentication information.23:18
thomimakes sense I guess :D23:19
wgrantOh.23:19
wgrantSo, I wouldn't break that convention there.23:19
thomiugh - I just noticed I have it in two places in the SS23:20
thomiI meant to undo the one in the top line :D23:20
wgrantEvery other item there is edited by the edit icon next to the title. I was thinking that there could be a "Subscribe to mailing lists" link or something like that.23:20
wgrantBut making the edit link for email addresses inconsistent with the rest probably isn't a great idea.23:20
thomiOK. Do you think it's worth moving mailing list subs to a separate page?23:21
thomithen it could be linked form the right-hand box thingy... or beneath the email header23:21
wgrantI would split it into a separate page, yeah. You'll need to review internal links to +editemails (eg. subscribe/unsubscribe buttons on team pages), and add a link in the Emails section and on the existing +editemails page.23:23
thomiwgrant: ok... I'll take a look23:27
thomiI have no clue how to add another page, but... how hard can it be? :D23:27
wgrantthomi: Let me know when you have questions.23:27
wgrantYep :)23:27
thomiwgrant: should clicking 'create mailing list' on a team when running launchpad.dev actually do something? or maybe the mailman backend is missing?23:44
wgrantthomi: initscript-start doesn't start it, but 'make run' should.23:44
wgrantIIRC23:44
thomihmmm, that's what I'm using.23:44
thomimaybe I'm being impatient23:45
thomiI get "This team's mailing list will be available within a few minutes."23:45
thomibut I haven't actually waited a few minutes23:45
wgrantthomi: Oh, run doesn't include mailman any more, that's right.23:48
wgrantTry run_all23:48
wgrantYou can see what runs mailman in Makefile23:49
thomiahh23:49
thomimuch better - now I get an oops instead of a blank widget :D23:50
wgrantHeh23:51
thomisweet - got a separate page rendered correctly. time for lunch23:53
wgrant:)23:53

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