/srv/irclogs.ubuntu.com/2010/04/23/#launchpad-dev.txt

rockstarIt's not been happiness.00:00
sinzuirockstar, you just need a breadcrumb adapter, but since you are messing with the hierarchy, I think my many title-like examples do not help00:01
rockstarsinzui, I don't specifically NEED to mess with hierarchy, but I didn't see another way.00:01
rockstarIf you have a better way, I are happy to hab it.00:01
* rockstar has a mushy brain before lunch time00:02
sinzuirockstar, I cannot find the hack I did for team membership. It has two parents based on context, and I used a breadcrumb adapter for it. The test is not in the registry/browser/test_breadcrumbs as I recall00:03
rockstarsinzui, ah, two parents would be perfect.  I already have a working breadcrumb that will do this.00:04
rockstarsinzui, where's that adapter at?00:13
sinzuirockstar, there are many. I am looking for one that change more than  the text00:13
rockstarsinzui, I need to change the text and the url basically.00:15
sinzuirockstar, look at registry/browser/milestone and ./tests/test_breadcrumbs for  MilestoneBreadcrumb00:17
sinzuithat will get you started while I look for a glorious hack00:17
rockstarsinzui, yeah, I was on my way to a glorious(ly bad) hack when I pinged you. :)00:18
rockstarI suspected it would require something hacky.00:18
rockstarsinzui, I don't see anything in milestone.py that would affect breadcrumbs00:24
sinzuirockstar, MilestoneBreadcrumb defines the text and you can redefine the url property00:25
sinzuirockstar, to change the order or items in the breadcrumb, you need to hack Hierarchy.objects in a subclass that is registered for the recipe. The default object are those that are traversed. you want to mutate self.request.traversed_objects or consider monkeying with .items to mutate one of the breadcrumbs00:30
rockstarsinzui, ah, okay.  It looks like I was already on that track then.00:32
sinzuiBranchHierarchy is the only good example I know of00:33
sinzuiThe teammembership issue was solved indirectly by the fact the views are ancient and I could hack the class the provide breadcrumb info00:34
sinzuiEdwin-lunch, ping00:36
=== Edwin-lunch is now known as EdwinGrubbs
EdwinGrubbssinzui: hi00:36
sinzuiEdwinGrubbs, I do not think setPrefered email address should create an account.00:37
sinzuiEdwinGrubbs, I do not think it should change an account00:38
sinzuiEdwinGrubbs, It may need to check that the email address has the account *and* person we expect. Consider if we are setting the person email address and the account is missing, we could add that (but I do not know of a case where this is a real issue)00:39
EdwinGrubbssinzui: do you mean you don't think createPersonAndEmail() should activate an account? I'm already removing that functionality from setPreferredEmail.00:39
sinzuiEdwinGrubbs, right no changing the account00:40
sinzuiEdwinGrubbs, I think there is a test that says it should doc/account?00:40
sinzuiEdwinGrubbs, That test predates SSO00:40
EdwinGrubbsok\00:40
abentleywgrant, it appears that I cannot pass archives as parameters into a launchpadlib request, due to some evil with a RedirectionView.  Have you encountered this?00:48
abentleywgrant, similarly, calling launchpad.load on a PPA's URL leads to infinite redirects.00:50
gary_postermwhudson: back for a sec.  errors in site-customize (and site.py) are swallowed generally in Python IIRC--that's what you are encountering in that regard.01:19
gary_posterAnd no, there is not a way to register something for a class and all subclasses.  The only mechanism right now would be for you to do the registration yourself, iterating over the subclasses.01:19
gary_posterA way to get somewhat similar effect but in a way that is a bit ugly is monkeypatch the root class you care about and say "__Security_checker__ = DummyChecker()" and define DummyChecker as something that allows all names with the zope.security.CheckerPublic permission.  That would mean that things were still proxied but they'd allow access very quickly.01:19
gary_posterAlternatively...we're in "propose a change to zope.security" land, which I'd be happy to help with, but would require the usual extra care for use cases that are not your own, and coding and social energy that might not pan out.01:19
mwhudsongary_poster: registering all subclasses seems to work for me for now01:33
mwhudsongary_poster: thanks for the follow up01:33
gary_postercool01:38
gary_posternight all01:44
cody-somervilleWhere does registry keep its tests for webservice API stuff? I don't see anything in lib/lp/registry/doc/product.txt for example.02:56
mwhudsoncody-somerville: it might be lib/lp/stories/webservice02:57
mwhudsonuh02:57
sinzuistories/webservice/project-registry.txt02:57
mwhudsonwith registry in there02:57
sinzui^ cody-somerville  stories/webservice/project-registry.txt02:57
sinzuiI still need to find a sane location for api tests02:58
cody-somervillesinzui, Should I export newSeries as new_series or newSeries? I notice newProject is exported as new_project and addFile as add_file but getSeries is exported as getSeries.03:00
sinzuicody-somerville, I think new_series is right.03:02
cody-somervillesinzui, Should I test new_series as extensively as new_project?03:02
sinzuiI think we need to verify only that it can be accessed using the correct permission and that a series was created. Any other test would duplicate the model teasts03:03
sinzuitests03:03
cody-somervillesinzui, FYI add_file doesn't seem to be tested for correct permissions03:14
sinzuicody-somerville, I may not have been clear...03:14
sinzuicody-somerville, permissions are defined else where for the web but the api commonly exposes items that are not in the web...03:15
cody-somervillesinzui, ah, you only want me to test that it can be used with the correct permission, not that it can't be used with incorrect permissions03:16
cody-somervilleBut considering that incident with the soyuz API, doesn't it make sense to test?03:16
sinzuiso if *anyone* can see the method/data, then use the anon helper, other login as the correct user and verify the driver can create a series.03:16
sinzuiI do not think testing something twice is good. I still want to run the tests on my computer in less than 30 minutes.03:17
* persia is a big fan of both positive and negative tests related to authorisation03:17
sinzuicody-somerville, test a driver and some other user to verify only the person that needs to access that method can03:18
cody-somervilleI'm confused. Do you want me to test permission or not? :P03:21
sinzuiI have a lot of confidence that newSeries sane permissions. I care that a project driver can create a series. Testing that someone else cannot can be done, but I think that would be testing a lazr.restful failure, not a zcml or developer failure03:23
cody-somervillesinzui, hmmm... looking at the apidoc, new_series looks out of place compared to all the other post methods on Project.03:32
sinzuiThe posts use methods names: newSeries?03:33
cody-somervillesinzui, looking through the API doc, most methods are camelCase03:33
sinzuiThen I think camelCase is nicest for users.03:34
cody-somervilleI agree.03:34
cody-somervillesinzui, https://code.edge.launchpad.net/~cody-somerville/launchpad/export-newSeries-via-api/+merge/2397804:08
sinzuicody-somerville, r=me. short and to the point. Do you want me to land this now?04:10
thumperrockstar: replace -- breadcrumb = queryAdapter(obj, IBreadcrumb)04:21
thumperwith04:21
thumperbreadcrumb = IBreadcrumb(obj, None)04:21
thumpersinzui: did you write breadcrumbs?04:22
sinzuisalgado did04:22
thumpersinzui: ok, do you agree with the above replacement?04:23
sinzuithumper, yes. i agree04:24
jtv1wgrant: heya!  I ran a first test of our buildfarm jobs.05:55
=== jtv1 is now known as jtv
mwhudsonbug 35280006:12
cody-somervillesinzui, I can land it myself but you're welcome to if you'd like.07:07
cody-somervillesinzui, landing07:09
wgrantjtv: How did it go?08:07
jtvwgrant: ran into a known buildmaster/soyuz bug.08:07
jtvbug 49657408:08
mupBug #496574: buildd-manager fails to deal with "Fault 8002" errors <buildd-manager> <soyuz-build> <Soyuz:Triaged> <https://launchpad.net/bugs/496574>08:08
jtvOf course that means the build still failed; probably a matter of getting the firewall settings right08:08
wgrantjtv: Yes, but what caused the slave fault?08:08
wgrantAh, right.08:08
jtvwayyy ahead of you08:08
wgrantYou sure it was actually a job failure? There was nothing else in the buildd-manager logs?08:09
adeuringgood morning08:10
wgrantWhenever mine failed I got a more descriptive traceback.08:10
bigjoolswgrant: what's wrong with having bzr-builder in the chroots?08:36
wgrantbigjools: It pulls in a whole tonne of crap on top of the minimal buildd environment, which will probably cause some builds to not work properly, and others to work when they should not.08:37
bigjoolswgrant: what crap, exactly?08:37
wgrantbigjools: bzr-builder, bzr, lots of Python...08:38
bigjoolssigh08:38
wgrantStuff which is not Build-Essential, so has no business being in our minimal chroots.08:38
bigjoolswgrant: having it in a PPA is crack08:38
wgrantbigjools: Why?08:39
bigjoolswe need a new chroot for daily builds08:39
bigjoolsbecause it's more shit to maintain08:39
wgrantMaintain two packages in a PPA, or maintain 6 new chroots...08:39
wgrant(chroots that need that PPA anyway)08:40
bigjoolshuh? one will suffice for daily build chroots08:40
bigjoolsthey'll be i38608:40
wgrant* many series08:40
bigjoolslucid only?08:41
bigjoolsor maverick only08:41
wgrantWhy?08:41
bigjoolsthis is for crack-of-the day, which is on the dev release08:41
wgrantDidn't someone just implement multi-series support a couple of weeks ago?08:42
bigjoolsanyway, even if we did 6 more chroots I don't see what the big deal is08:42
wgrantAll, crack-of-the-day isn't only the dev release, is it?08:42
wgrantbigjools: Where do those chroots get their packages?08:42
wgrantA PPA, probably.08:42
wgrantSo a PPA has to be maintained anyway.08:43
bigjools?!08:43
bigjoolsthe package would be installed in the chroot08:43
wgrantYes.08:43
wgrantBut what builds the package?08:43
mrevellHowdy09:05
maxbWhat's wrong with having bzr-builder in a PPA and installing it on every build? That's exactly analogous to an existing package build.09:06
wgrantExactly my point.09:08
bigjoolsthere are 2 issues, not necessarily problems but things to think about:09:14
bigjools1. it's slower to do that09:14
bigjools2. it's another external dependency to maintain, which can go wrong and block builds09:15
bigjoolsif the IS people who will run it decide that it's ok to do that, then I don't mind09:15
bigjoolsultimately they will decide09:16
bigjoolsbut I want to consider all options before diving into the first one we think of09:16
jmlgood morning09:32
jmlyou know #haskell gets a lot of traffic09:32
=== almaisan-away is now known as al-maisan
mrevellHey noodles775, can I bug you again about that underline on the help images?09:46
noodles775mrevell: sure09:51
noodles775Can anyone point me to where I can read about supporting different API versions? It's not at https://dev.launchpad.net/API/ImplementingAPIs10:42
* noodles775 reads the source in the meantime.10:42
* noodles775 finds lazr/restful/example/multiversion10:46
=== al-maisan is now known as almaisan-away
didrocksjml: can you think we can have someone on the Launchpad side for this spec (https://blueprints.edge.launchpad.net/ubuntu/+spec/desktop-maverick-quickly), to speak about proper way for gpg/ssh upload11:25
=== almaisan-away is now known as al-maisan
=== mrevell is now known as mrevellunch
=== matsubara-afk is now known as matsubara
jmldidrocks: by "spec" you really mean UDS discussion session, right?13:41
didrocksjml: right13:41
=== al-maisan is now known as almaisan-away
jmldidrocks: yeah. It's possible that the right people to speak on the topic aren't going to be at UDS13:41
didrocksjml: oh, you told me the contrary when we saw the gpg/ssh issue :/ do you think there could be a way to advance on the subject?13:42
jmldidrocks: we can get them in remotely13:42
didrocksjml: otherwise, I'll do the ugly hack as groundcontrol do with screenscrapping13:42
didrocksthat's the easy solution, but well :/13:43
jmldidrocks: I'll ask around.13:43
didrocksthanks :)13:43
jmldidrocks: do you remember the bug report about all of this13:45
didrocksjml: I guess the gpg and ssh key were closed, even if not 100% feature-full (only the consultation part is achieved)13:45
jmldidrocks: still, the bug would be helpful13:46
didrocksjml: do I create one for ssh, one for gpg?13:47
jmldidrocks: you mean there aren't bugs already? sure, one for each please.13:48
didrocksjml: I can reopen the old bug, but they were closed one we pushed the read branches13:48
didrocksjml: will do, one sec13:48
jmldidrocks: I think we might also need to have a separate discussion at UDS regarding bug 53205513:50
mupBug #532055: Provide a user-friendly way of authorizing desktop, GUI launchpadlib applications <launchpadlib :Triaged> <https://launchpad.net/bugs/532055>13:50
didrocksjml: that would be great13:52
=== mrevellunch is now known as mrevell
jmldidrocks, emphasis on _separate_13:54
didrocksjml: yeah, that's a big discussion ;) Ok, filed bug #568981 and bug #56898213:56
mupBug #568981: Enable uploading a public gpg key using the API <Launchpad Registry:New> <https://launchpad.net/bugs/568981>13:56
mupBug #568982: Enable uploading a public ssh key using the API <launchpadlib :New> <https://launchpad.net/bugs/568982>13:56
sinzuididrocks, why is sshkeys targeted to launchpadlib? ssh key code is in launchpad-registry13:58
didrockssinzui: my bad, retargetting13:58
didrocksI took the other bug as a reference and mis-middle click :)13:59
didrocksfixed13:59
* jml lunches14:14
maxbStaging broken?14:19
marsmaxb, looks down to me14:21
maxbWe could really use a status page for staging & edge autoupdate14:22
marsmaxb, it is on my personal todo list14:22
marsthe question is finding time to personally do it :)14:23
marsI don't have time outside of work for hacking14:23
=== ChanServ changed the topic of #launchpad-dev to: Launchpad Development Channel | Week 2 of 10.04 | PQM is open | https://dev.launchpad.net/ | Get the code: https://dev.launchpad.net/Getting | On-call review in irc://irc.freenode.net/#launchpad-reviews | Use http://paste.ubuntu.com/ for pastes | staging is down!
mhall119is there currently any work being done to add a wiki to Launchpad?14:31
mhall119it looks like there used to be blueprints for it14:31
bigjoolsjml: ^^ :)14:33
jmlmhall119, there's no funded work going on14:33
jmlmhall119, some of the Launchpad developers are working on something like it in their spare time14:33
mhall119jml: do you know which ones?14:33
jmlmhall119, thumper, mostly14:33
mhall119thumper: are you still working on a Launchpad Wiki component?14:34
jmlmhall119, it's 1:30am where thumper is14:34
mhall119oh, nevermind then14:34
mhall119maybe I'll catch him tonight14:35
mhall119I'm hoping it'll be like bitbucket's wiki, only with bzr instead of hg14:35
jmlmhall119, I'm not sure that thumper is being inspired by bitbucket, but I'm pretty sure it's a bzr-backed wiki14:35
jmlmhall119, we've been talking about this for a very long time14:36
mhall119cool14:36
mhall119I like being able to work on a wiki offline, or mass-edit with CLI tools, then merge it back in14:37
persialp:wikkid is the link posted earlier, if someone wants to look at WIP14:37
mhall119often times I've wished I could do that with wiki.ubuntu.com14:37
persia(posted in #launchpad about 12 hours back)14:37
persiamhall119: editmoin14:37
mhall119persia: thanks, but I don't think that's quite the same14:38
persiaheh, true.14:39
mhall119I'm branching wikkid right now though14:39
mhall119thanks for that refference14:39
persia#launchpad is an informative channel : I recommend it's backscroll.14:42
henningeallenap, adeuring, gmb: Can either of you resolve the two merge conflicts in lib/lp/bugs/scripts/checkwatches/tests/test_core.py, please?15:18
henningelib/lp/bugs/scripts/checkwatches/tests/test_core.py15:18
henningehttp://paste.ubuntu.com/421058/15:18
henningeThere it is ^15:18
allenaphenninge: I'll look.15:18
allenaphenninge: Is this when merging from devel into db-devel?15:19
henningeallenap: into production-stable, yes.15:19
allenaphenninge: production-devel into production-stable?15:20
henningeallenap: sorry ;-)15:20
allenaphenninge: There's stuff in there that shouldn't be anywhere near production yet.15:21
henningeallenap: I have a branch based on production-stable but now I want to merge it into devel, so I am merging devel into it.15:21
henningewas a c-p candidate originally.15:21
allenaphenninge: Why not start a fresh devel branch and merge the production-stable branch into it?15:22
allenaphenninge: Oh I guess it's much the same.15:22
henningeallenap: that was my next option but I was down to two conflicting files, so I thought might as well resolve those.15:22
henningeallenap: the result will be merged in to devel (just to be clear).15:22
allenaphenninge: Can you point me to your production-stable branch? I can help you fix the conflicts, but I want to understand *why* it's conflicting. IIUC, it shouldn't.15:24
henningesure15:24
bachi thekorn, do you know how to call a destructor on a lplib object?  bug 534363 implies there is a trick.15:24
mupBug #534363: no easy way to call destructor <usability> <launchpadlib :Triaged> <https://launchpad.net/bugs/534363>15:24
henningeallenap:  https://code.edge.launchpad.net/~henninge/launchpad/bug-565294-nplurals15:25
allenaphenninge: Thanks.15:25
sinzuiallenap, do you have time to read and reply to my proposal to fix the needs-packaging timeouts?15:27
allenapsinzui: I read it a couple of times but I didn't really take it in very well. I'll look again today, and get back to you. Will that be okay?15:31
sinzuiallenap, yes. I picked you because I am extending the not-so-temporary table you added. You may have thoughts about how to make it untemporary and maybe a cron process is wrong15:32
thekornbac, sorry, I don't know anything about launchpadlib and DELETE, and I also don't think there are any DELETE methods eposed through the API yet15:32
allenapsinzui: IIRC, bigjools had some ideas about that at the time.15:33
thekornI think all destructors are POST methods until now15:33
allenaphenninge: If you take a fresh branch of devel, the following will merge your changes without conflict: bzr merge -r 9192.. lp:~henninge/launchpad/bug-565294-nplurals15:33
sinzuibac: maybe we should unexport delete  milestone and declare victory15:33
bacthekorn: thanks.  there are some, and i'm trying to fix one.  the ones that already exist don't appear to work, though.15:34
bacsinzui: can i haz my week back?15:34
allenaphenninge: You probably know this now, but CPs are less hassle when landed in devel first. I have made that mistake before. Or was there a reason?15:35
henningeallenap: no, no other reason.15:35
henningeallenap: so you mean, land in devel, then merge the revisions into a production branch and hand that of for cp?15:36
henningeallenap: In this case I was trying to avoid using a new devel branch so that all the mp and qa automatic keeps working.15:37
sinzuibac: all work is about scope management. Always state how much your time is worth when you start, fix the core problem first, them incorporate tech-debt for good karma as time allows15:37
henningebut oh well, can't have everything ...15:37
* sinzui will not work on any trivial bug for more than 1 hour15:38
allenaphenninge: Yes. I suspect the policy is there to make sure the code is landed so that we don't regress next release.15:38
allenaphenninge: Eurgh :)15:38
* henninge googles that ... ;)15:39
allenaphenninge: Fwiw, https://wiki.canonical.com/Launchpad/PolicyandProcess/EmergencyChange says to land in devel first too.15:40
henningewow, should have read that page first ...15:42
henningeallenap: thanks15:43
henningeallenap: so can you resolve the file or should I go the new-devel-branch road?15:43
allenaphenninge: Please go the new-devel road. It merges cleanly which has got to be a good thing, especially as gmb is doing some major refactoring in the checkwatches package.15:46
henningeallenap: ok, np. Have a nice weekend! ;)15:47
allenaphenninge: I think it makes sense to have a separate merge proposal anyway (and you can link back to the first one), and if the auto-qa-tagging thing doesn't understand the situation then it's a bug in the auto-qa-tagging machinery.15:47
allenaphenninge: You too :)15:47
henningeah, right15:47
cody-somervilleI'm a bit confused by setBugSupervisor. Why does it take two arguments?16:17
jpdscody-somerville: Permission checking in userCanAlterSubscription() ?16:28
cody-somervillejpds, I think you're guessing16:29
james_wcody-somerville: the second is the person doing the setting16:42
james_wcall_with(user=REQUEST_USER) over the API16:42
=== matsubara is now known as matsubara-lunch
=== almaisan-away is now known as al-maisan
=== beuno is now known as beuno-lunch
=== matsubara-lunch is now known as matsubara
=== beuno-lunch is now known as beuno
mrevellnight18:33
sinzuiEdwinGrubbs, didn't we fix the shadowing issue described in bug 567583 6 months ago?18:59
mupBug #567583: API collections shadow the default traversal <Launchpad Registry:New> <https://launchpad.net/bugs/567583>18:59
=== gary_poster is now known as gary-lunch
jmljames_w, how do I use lazr.restfulclient.tx without installing it?19:24
jmlpython really isn't built for namespace packages :\19:26
cody-somervillesinzui, for LP #444266, where would I write the tests for that? There doesn't appear to be any good existing doctest to add to in lp/bugs/stories/webservice/19:37
mupBug #444266: Expose project bug supervisor and security contact via API <api> <oem-services> <Launchpad Bugs:In Progress by cody-somerville> <https://launchpad.net/bugs/444266>19:37
* sinzui thinks19:38
sinzuicody-somerville, I think you want to create a new test for the api. hasbugsupervisor maybe?19:39
sinzuiin lp/bugs/stories/webservice/19:39
cody-somervilleis the security contact a part of registry or bugs?19:41
sinzuibugs19:41
sinzuiThat has a separate interface19:41
sinzuimaybe we can add a bugtarget.txt doctest to that directory to cover both19:41
EdwinGrubbssinzui: no, we didn't solve the underlying cause. I just changed the name of the "releases" series that was colliding with IProduct.series. I then assigned bug 432766 to leonard.19:42
mupBug #432766: instance name can shadow object attributes <Launchpad Foundations:Triaged by leonardr> <lazr.restful:Triaged> <https://launchpad.net/bugs/432766>19:42
sinzuicody-somerville, I expect those fields to be visible to anon api19:42
sinzuiEdwinGrubbs, thanks.19:42
EdwinGrubbssinzui: I marked the bug as a duplicate19:42
sinzuieven more gratitude19:43
cody-somervillesinzui, The only interfaces that have a security_contact field exist in registry.19:43
sinzuicody-somerville, yes. that interface is a problem. it is design has proven to be an issue when we try to make a single page to set bug configuration19:44
jmlhow do I get the JSON dict from a launchpadlib object?19:45
sinzuicody-somerville every bugtarget is also a registry object, but the security contact is only used by bugs.19:45
sinzuicody-somerville, you can only set that field is bug tracking is enabled. I think that is stupid.19:46
jmllpobj._wadl_resource.representation does the trick19:47
jmldon't worry, I don't intend to let anyone else use this code19:47
cody-somervillesinzui, In fact, the only interface I see that has a security_contact field is series and that just says it references the parent security contact.19:49
sinzuicody-somerville, I am telling you the truth. bugtarget is the answer. There is a long history of application wrongly placing attributes on common objects. This makes refactoring difficult, the modules are long, and confuses new hackers who do not know who really owns the feature.19:50
sinzuicody-somerville, think of it this way, if an application does not use launchpad bugs, it cannot have a security contact or a bug supervisor. if we got rid of that application the fields would not be used. Thus those fields are the domain of Launchpad Bugs.19:52
cody-somervillesinzui, I understand that19:52
cody-somervillesinzui, I'm asking you though, where is the actual interface that these models are implementing that has the security_contact field so I can decorate it?19:53
sinzuiI do not recall since I do not work with it. I bet based on its age that is canonical.launchpad.interfaces.launchpad.IHasSecurityContact19:54
=== gary-lunch is now known as gary_poster
cody-somervillesinzui, good call20:05
sinzuiMaybe 3 years it too long to work on a project when you can take a blind stab at an answer and nail it20:06
cody-somervillesinzui, Now, what prevents someone without the correct permissions from modifying bug supervisor/security contact? Just the view?20:07
sinzuiI think permission on the implementer state who can change the field.20:08
* sinzui looks20:08
sinzuisecurity_contact: launchpad.Edit20:08
sinzuisetBugSupervisor: launchpad.Edit20:09
sinzuicody-somerville, The permissions are on the object and restful will enforce that20:09
cody-somervilleawesome20:10
cody-somervilleI remember reading something about permissions and views and wanting to make it apply automatically to restful stuff? What was that all about?20:10
sinzuizope.Public is the an implicit permission in some cases on objects/views. Restful ignored that, and the consequence is that some objects/attributes cannot be viewed via anonymous access. We need to add permission to security.py to explicitly allow those objects to be visible to anonymous users. IDistributionMirror is an example20:13
cody-somervillesinzui, How do I export bug_supervisor as readonly? I thought I could pass readonly=True to exported but that doesn't appear to be true.20:16
sinzuiIt is read only I think20:17
cody-somervilleyou think it already is?20:18
cody-somervilleor the argument is called just 'read'?20:19
sinzuicody-somerville, there is no set_attributes declaration for bug_supervisor. No callsite can change the value without getting stripping the security wrapper20:19
sinzuicody-somerville, have you verified in a test that someone can change that attribute?20:20
sinzuiA launchpad view running for an admin would get a forbidden error if it tried to change that field20:20
cody-somervilleI guess I'll generate the apidocs and see what it says20:21
cody-somervillesinzui, the bug supervisor stuff doesn't show up in apidocs. security_contact does though. I think its because IProduct does not inherit IHasBugSupervisor whereas it does IHasSecurityContact.20:29
sinzuicody-somerville, yes. I suspected one of these would be a problem. I assumed that is why it was not exported in the past20:30
sinzuiI think IHasSecurityContact needs to be exported too. It may need a url defined since restful cannot access anything without a URL.20:31
cody-somervillesinzui, security_contact shows up fine. I just exported security_contact field in IHasSecurityContact like normal.20:32
sinzuiI think this is like the issue we had with IDistributionMirror. We added a checker to security.py and a browser:url to browser/configure.py as well as exporting the base interface20:32
sinzuidoes the interface also have this: export_as_webservice_entry()20:33
cody-somervillesinzui, no20:34
sinzuiAdd that, I think you do need to add a security checker and a url.20:34
cody-somervillesinzui, For IHasSecurityContact? why would we want this to be a webservice entity?20:35
sinzuicody-somerville, I am off to rescue my children from the state institution. you can cargo cult IDistributionMirror examples from security.py and browser/configure.zcml to get the two missing parts20:35
cody-somervillesinzui, IProject inherits IHasSecurityContact so why would IHasSecurityContact need to be its own webservice entity?20:36
thumpergary_poster: I'm wanting to be able to turn a canonical_url into a list of traversed objects (attached to a request even better)20:36
thumpergary_poster: but I couldn't find the right hooks in the publisher code20:36
thumpergary_poster: instead of getting too frustrated, I thought I'd just ask you20:36
thumpergary_poster: as I have a feeling you'll know where to look20:36
thumpergary_poster: it is for testing breadcrumbs more easily20:37
thumpergary_poster: the current way requries passing in the traversed objects list20:37
gary_posterthumper :-) I'll try at least.20:37
thumpergary_poster: but I think that should really be unnecessary20:37
thumpergary_poster: we should be able to say "create me the breadcrumbs for this object"20:37
thumpergary_poster: and have the test hook into the publisher then create the view20:38
thumperI have to go get the girls up now, but I'll check back later20:38
gary_posterthumper, in classic Zope 3 you'd walk up the __parent__ list.  OK, cool, I'll look at code for a sec, and then confer with flacoste if I don't see anything20:39
gary_posters/list/pointers20:39
gary_posterOK I've read it three times and I think I understand what you want.  looking...20:41
cody-somervillewhy does IHasBugSupervisor subclass IStructuralSubscriptionTarget?20:52
james_wjml: I had to use a mess of virtuaenv and symlinks20:57
=== EdwinGrubbs is now known as Edwin-lunch
gary_posterthumper: I reacquainted myself with some of the pertinent code, and though I'm still not confident I understand what you mean, I'm not optimistic.  Maybe point me to a concrete example of what's going on now, with an example of what you want, and I'll give it another whirl?21:02
gary_posterjames_w, fwiw, as they exist now, namespace packages won't work if the namespace package actually has code in it.  If you actually wanted to release lazr.restfulclient.tx, it would need to be lazr.restfulclient.plugins.tx, or something, where "plugins" has no code.  I don't remember if the PEP for namespace packages lifts that restriction or not, but that is the case for now, anyway.21:03
gary_posterlazr.restfulclient-tx?21:04
gary_posterdunno what it is21:04
james_wGary_poster: thanks for the tip. I'll probably end up changing the name.21:08
gary_postercool21:08
james_wIt's a fork of lazr.restfulclient based in twisted with some experiments thrown in.21:10
gary_posteroh!  experiments good, fork, boo :-/21:10
gary_posteris there something we could do to not encourage a fork?21:11
thumpergary_poster: I'm wanting to create the +hierarchy view for an object, however the request for create_initialized_view has no traversed objects, and the hierarchy view uses those21:14
thumpergary_poster: I want to check the items of that view to check the breadcrumbs for any object21:14
thumpergary_poster: so... given any object, get the canonical_url for it, work out the traversed objects, and create a request with that to pass into create_initialized_view21:15
thumpergary_poster: for simple breadcrumb testing21:15
thumpergary_poster: I'm sure a method to get the traversed objects for any given other object would be a very helpful testing function21:15
gary_posterok, thumper.  Maybe.  Looking.21:15
gary_posterso, thumper, a test request is not just ok but good, right?21:16
thumpergary_poster: yes21:16
gary_posterk21:16
=== Edwin-lunch is now known as EdwinGrubbs
james_wgary_poster: we can refactor lazr.restfulclient so that we can share code, but it has a lot of sync assumptions and the API makes no sense for twisted.21:27
gary_posterthumper, the best I can come up with is to suggest that you refactor the code in canonical_url.  It does most everything you want, I think, but discards the parts you care about.21:28
thumpergary_poster: hmm...21:29
thumpergary_poster: ok, I'll take a look monday21:29
thumpergary_poster: thansk21:29
gary_postercool, thumper21:29
gary_posternp21:29
thumpergary_poster: although I was hoping that we could hook into the publishTraverse somewhere21:29
thumpergary_poster: I don't think we'd get exactly the same answer21:30
gary_posterthumper: understood.  there's a reason that canonical_url is so messy though. :-/21:30
thumpernot all the time anyway21:30
gary_posterjames_w: I'm a big +1 on Twisted support, very understanding of the differences necessary for async, and unhappy if there is a lot of code duplication between the original and the fork, as I think there would be.  If you (and jml?) had suggestions on a refactoring to make code sharing easy, I'd be eager to come to an agreement and incorporate them, rather than see a fork develop.21:34
james_wart_poster: I'm not happy with a fork either, and it's huge duplication right now. its also just a toy right now, if it has legs then I'll push for sharing what we can.21:37
james_wSorry, crappy phone keyboard :)21:37
gary_posterLOL21:38
gary_posterjames_w: OK, great sounds good21:38
cody-somervilleHow do I fix 'zope.configuration.config.ConfigurationConflictError: Conflicting configuration actions'?21:40
marscody-somerville, sinzui may know.  He wrote our configuration libraries.21:58
sinzuimars, no, cody-somerville is talking about ZCML21:58
cody-somervillesinzui, you're back :)21:59
sinzuicody-somerville, I have experienced that. You have added a duplicate permission rule for an object/attribute. ZCML allows only one rule.21:59
sinzuicody-somerville, Search for the Interface or attribute you added to locate the current rule and update that rule instead21:59
cody-somervilleI didn't touch ZCML22:00
sinzuioh?22:00
sinzuiyuck22:00
* sinzui thinks22:00
sinzuicody-somerville, did you add a browser:url?22:00
cody-somervilleNope22:00
cody-somervilleI started getting that error when I made IProductPublic inherit IHasBugSupervisor.22:00
cody-somervilleI noticed a bunch of methods and what not for IStructuralSubscriptionTarget and then noticed IHasBugSupervisor inherits IStructuralSubscriptionTarget and so does IProduct22:01
cody-somervilleso I made IHasBugSupervisor just inherit from Interface and it reduced the complaining to just the bug_supervisor and setBugSupervisor attribute and method respectively.22:01
wgrantcody-somerville: So, basically, Zope security ZCML sucks.22:07
wgrantInstead make IProduct inherit IHasBugSupervisor, not IProductPublic.22:07
wgrantUnless you want to split IHasBugSupervisor into two.22:07
sinzuiI agree with wgrant's first assertion and first suggestion22:08
cody-somervilleokay22:08
wgrant(if you look in lib/lp/registry/configure.zcml, you'll see that those two attributes already have manual declarations for IProduct and IDistribution)22:08
cody-somervilleIs it correct to make IHasBugSupervisor subclass Interface instead of IStructuralSubscriptionTarget? I can't understand why it would.22:09
cody-somerville(why it would subclass IStructuralSubscriptionTarget that is)22:09
sinzuicody-somerville, I think you may want to remove the ZCML rules on the pillar for bug_supervisors. define the rules just on IHasBugSupervisor22:09
=== matsubara is now known as matsubara-afk
wgrantsinzui: Aren't permissions applied to classes, not interfaces?22:10
wgrantcody-somerville: Some of the bug supervisor stuff might touch structural subscriptions.22:10
wgrantGrep around, I guess.22:10
sinzuicody-somerville, removing IStructuralSubscriptionTarget as a base will break subscription behaviour I think22:10
cody-somervilleWhy?22:11
cody-somervilleIProduct inherits IStructuralSubscriptionTarget22:12
wgrantIt won't break it.22:12
cody-somervilleand IHasBugSupervisor should have nothing to do with IStructuralSubscriptionTarget - the fact that the bug supervisor creates a bug subscription is an implementation detail, right?22:13
wgrantBut it might be wrong.22:13
sinzuicody-somerville, did you check every object that inherits IHasBugSupervisor?22:13
cody-somervillesinzui, Not yet.22:14
=== al-maisan is now known as almaisan-away
cody-somervilleWhy does setBugSupervisor in IHasBugSupervisor have self as an argument? I thought interfaces didn't need 'self'?22:18
sinzuicody-somerville: I think lint will tell you you are right22:19
wgrants/didn't need/cannot have/22:20
wgrantA verifyObject test will probably start failing if you don't fix that.22:20
sinzuicody-somerville, I think you can can make every product and distribution inherit from both IStructuralSubscriptionTarget and IHasBugSupervisor, then make IHasBugSupervisor descend from Interface22:20
cody-somervillewoot. got make to work now.22:21
cody-somervilleI should probably make bug_supervisor read only but will that break anything or does it only affect the the webservice API?22:23
wgrantIt may affect forms too.22:24
wgrantYou should also not export setBugSupervisor directly -- instead export it as the mutator for bug_supervisor.22:24
sinzuicody-somerville, If you copied the original permission, the attribute is read-only22:25
wgrantgary_poster: Um, so you're going to be sending privileged cookies over HTTP?22:29
wgrantEven if they have a short lifetime, that is...... um.....22:29
gary_posterwgrant, yup22:29
wgrant............22:30
wgrantDoes this come under 'who could possibly think that was a good idea?', or am I missing something?22:31
gary_posterwgrant, the question is a matter of balance, as usual.  Right now, the plan is that identity uploads and private teams, projects etc. would be over HTTPS (with their own separate cookies).  The rest would be on HTTP.22:35
gary_posterHTTPS costs around 30-40% of a typical download cost for our pages.  We feel that there are large swaths of actions working on normal public content that don't need HTTPS.  github is a competitor (sorta) I'm familiar with; they feel similarly, apparently.22:35
gary_posterIt's been discussed internally, but if you wanted a debate it would be reasonable and healthy.  If I don't convince you quickly, we should take it to the list.22:36
wgrantgary_poster: You know there are Launchpad POSTs on public objects that can publish code to many millions of users?22:37
wgrantMaking Launchpad less secure should not be a priority.22:37
gary_posterMaking it faster is.22:37
wgrantIt guards things that are vastly more important than anything GitHub has direct access to.22:37
gary_posterThat's the single biggest change we can make to do that.22:37
wgrantServe public reads over HTTP, sure.22:37
wgrantInclude an unprivileged cookie in these requests so you can render the pages as if they were authenticated.22:38
wgrantBut writes over HTTP? Ew.22:38
gary_posterwgrant: That's the plan, and it is certainly not without precedent.  We have discussed adding an additional level of protection for projects, in addition to "private": "protected".  This would be public, but forced over HTTPS.  This would be opt-in.22:43
gary_posterYour point of sending bunches of email is a good one though22:43
wgrantgary_poster: So you are seriously going to allow insecure write requests?22:43
flacostewhat is the "bunches of email" point?22:43
wgrantI made no bunches of email point.22:43
wgrantI made a "bunches of malware" point, though.22:44
flacostewgrant: the first goal is to allow HTTP for read-only public stuff22:45
gary_posterI misread the comment.  If you are discussing PPAs, granted.22:45
elmoflacoste: no one's objecting to that22:45
elmoflacoste: it's the writes that the problem22:45
flacostewgrant: we'll consider write over HTTP in a second iteration after a proper risk-analysis22:45
wgrantgary_poster: Launchpad has one very large project: Ubuntu.22:46
wgrantNot just PPAs. Much, much worse.22:46
wgrantflacoste: OK, good to know.22:46
gary_posterwgrant, yes.22:46
flacostewgrant: there are multiple place where write over http wouldn't be a problem from a RA perspective: filing and commenting on bugs for example22:46
wgrantflacoste: That is a security issue.22:46
wgrantProjects use bugs for admin requests.22:47
flacosteeverything is security issue22:47
wgranteg. Ubuntu uses them for sync requests.22:47
flacostethat's why you have risk analysis22:47
wgrantOK, an *actual security problem*, then.22:47
flacostethat's interesting, so you can trigger a Debian sync from an email to Launchpad?22:48
flacosteGPG-signed of course22:48
elmoI suspect some of the exposed archive stuff would also be an interesting avenue for serious abuse22:48
wgrantNot automatically, but yes.22:48
wgrantelmo: Oh yes.22:48
wgrantA quick syncSource here and there...22:48
flacosteanyway, we aren't opening those gates yet22:48
flacostebut thanks for verifying that a RA was on our plan before we did :-)22:49
wgrantU1 manages to do AJAX over HTTPS with <500ms from here.22:53
wgrantThere's no reason for your writes to take much longer than that.22:54
wgrantSo I really don't see the benefit in throwing security out the window.22:54

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