/srv/irclogs.ubuntu.com/2013/02/20/#launchpad-dev.txt

=== wedgwood is now known as wedgwood_away
=== wedgwood_away is now known as wedgwood
=== wedgwood is now known as wedgwood_away
StevenKwgrant: Can you see https://qastaging.launchpad.net/~stevenk/+archive/private ?00:37
wgrantStevenK: I'm god00:43
wgrantStevenK: You probably want to try with an unprivileged account00:43
StevenKYeah00:43
StevenKI'm doing so00:43
wgranteg. me+testing00:43
StevenKI'm in the middle of using my other account00:43
wgrantAh00:44
StevenKResponse body:00:47
StevenK---00:47
StevenK(<Archive at 0x116cf510>, 'getBuildRecords', 'launchpad.View')00:47
StevenKI think I can cope with that00:47
StevenKAnd external_dependencies is returned as redacted00:47
StevenKwgrant: I can add me+testing if you want to poke around00:48
wgrantStevenK: As long as +index renders with some packages it's probably OK00:49
StevenKHmm00:49
StevenKHow to inject some packages into it00:49
wgrantYou can use syncSource to copy stuff on qas00:49
wgrantAlthough PCJs might work there too; I don't quite recall.00:49
StevenKI don't know if the PCJ runner is working00:49
StevenKs/working/set up to run/00:50
wgrantSo use syncSource :00:50
wgrant)00:50
StevenKwgrant: My qas auth token is my test account which has no privs00:51
cjwatsonI think PCJs are set up there00:51
cjwatsonVaguely recall from the last time I cared00:52
cjwatsonYou would find out soon enough00:52
StevenKOh, that reminds00:52
StevenK*me00:52
* StevenK gets a bunch of flags removed from qas00:52
cjwatsonwgrant: Did you see my updates to https://code.launchpad.net/~cjwatson/launchpad/bpph-phase/+merge/144154 ?00:57
StevenKHmph, now Archive:+index gives Not allowed here01:03
wgrantcjwatson: Oh, sorry, completely missed that email01:17
wgrantStevenK: Exactly what I was hoping for01:17
StevenK:-(01:18
wgrantStevenK: https://code.launchpad.net/~wgrant/launchpad/archive-defer-deletion/+merge/14898801:48
wgrantChange is that I now set dateremoved on anything that doesn't already have it set, rather than just setting it on formerly active pubs01:48
wgrantOtherwise stuff that was superseded/deleted but hadn't been p-d-r'd yet would stick around forever01:49
StevenKwgrant: _getBinaryPublishingBaseClauses has include_removed=True, and getPublishedSources has it as False, which is it?02:21
wgrantStevenK: Oops02:34
wgrantStevenK: I initially had it as exclude_removed=False, but inverted it but missed one default02:34
wgrantThat would have failed a lot of tests02:34
wgrantFortunately02:34
wgrantFixed02:35
wgrantStevenK: Any other objections?03:10
StevenKwgrant: No, no other objections.03:13
wgrantThanks03:14
=== gary_poster is now known as gary_poster|away
StevenKUnauthorized: (<SourcePackagePublishingHistory at 0x111008d0>, 'id', 'launchpad.View')04:02
StevenKThis displeases me04:02
StevenKThat I had to move dependencies to SubscriberView also displeases me04:03
StevenKwgrant: So I need to change the SPPH adapter to say you have View if you hold SubscriberView on the archive?04:13
wgrantStevenK: I suppose so04:13
wgrantStevenK: https://code.launchpad.net/~wgrant/launchpad/ppa-permadeath/+merge/14946204:18
StevenKNo fair stealing r1650004:18
StevenKrenamable looks wrong04:21
wgrantOh?04:22
wgrantThe is_copy bit is slightly insane now that they can be published04:22
wgrantBut I didn't really want to go near that, and there's no way to actually trigger the problematic rename today04:22
StevenKSorry, the actual variable name, not the calculation for it04:22
wgrantMaybe it deserves an extra e04:23
wgranthttp://en.wiktionary.org/wiki/renamable04:23
wgrantrenameable is listed as an alternative form, but doesn't have a page04:23
wgrantI win04:23
StevenKI didn't say it was wrong, I said it *looks* wrong.04:24
StevenKwgrant: Bleh, IArchive.dependencies is on +indexx04:27
StevenK*+index04:27
wgrantStevenK: Sure, and it's not hugely sensitive.04:27
StevenKwgrant: It isn't?04:28
wgrantStevenK: I don't think so04:31
wgrantIt's a list of PPAs04:31
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/new-perm-for-archive-subscribers-fixed/+merge/14946404:36
wgrantStevenK: Have you tested this more thoroughly locally?04:37
StevenKSpoil all my fun04:37
wgrantStevenK: Why does checkUnauthenticated forward using check_permission (which uses global state)?04:37
StevenKwgrant: Since I don't really understand security adapters and copied from the LimitedView one04:38
wgrantI'd check to see if there's a reason it doesn't just use forwardCheckUnauthenticated or similar04:39
StevenKwgrant: I have approved your MP04:40
wgrantStevenK: Thanks04:42
wgrantStevenK: For cleanup, I think we should just reset the status to active if it's deleted but enabled, and set the rest to deleting04:43
wgrantAnd reenable the publish flag, I guess. So they get redeleted by the publisher, setting dateremoved and renaming them04:43
StevenKRight04:43
StevenKHow many are we talking about?04:44
wgrant status | enabled | publish | count04:47
wgrant--------+---------+---------+-------04:47
wgrant      2 | f       | f       |  780304:47
wgrant      2 | f       | t       |     304:47
wgrant      2 | t       | f       |   24104:47
wgrant      2 | t       | t       |   13204:47
wgrantSo ~400 get actived, and 8000 back to deleting04:47
StevenKRight04:47
StevenKIt might be okay to do that via SQL04:47
StevenKThe numbers are a bit high for my liking04:48
wgrantNot really. There's likely to be crap on disk04:48
StevenKRight, so we need a garbo to clean this crap up?04:48
wgrantAnd the number of pubs that would need updating is large04:48
wgrantNo04:48
wgrantOh04:48
wgrantYou mean set the archive status with SQL?04:48
wgrantYes, that was the plan04:48
StevenKRight04:48
wgrantI thought you meant avoiding the publisher04:48
StevenKNo no04:48
StevenKI'm not sure about updating 8000 Archive rows in 2.5 seconds04:49
StevenKWith a temp table it's probably doable04:49
wgrantNo need for a temp table04:49
wgrantCalculating the set takes about 15ms04:49
StevenKNo triggers on archive?04:49
wgrantApart from the fti update04:50
wgrantSo nothing of consequence04:50
StevenKSo, once we deploy we fix stuff up?04:50
wgrantRight04:50
StevenKSounds like a plan04:51
StevenKI'm testing this stuff04:51
wgrantGreat04:51
wgrantHopefully it won't need a 5th emergency landing04:51
StevenKMy stuff or yours?04:51
StevenKBah, forgot to subscribe myself04:52
wgrantYours04:52
StevenKDon't remind me04:52
StevenKAlready feel like a moron04:52
wgrantThe UPDATE takes ~3s on DF, so should be fine on prod04:52
wgrantAnd given the rows it's touching I don't really care if it holds a lock for slightly too long04:53
wgrantThe update that touches active rows is around 300ms04:53
wgrantSo all fine04:53
StevenKwgrant: There is no expander for sources on Archive:+index, right?04:58
StevenKThere are not04:59
StevenKSo it looks good04:59
wgrantYeah04:59
wgrantThat's on +packages04:59
StevenKWhich is Forbidden04:59
StevenKhttp://pastebin.ubuntu.com/1687066/04:59
wgrantI'd hope so, given it needs View05:00
wgrantStevenK: Any other calls to check_permission in lp.security that want fixing05:00
wgrant?05:00
StevenKwgrant: Only LimitedViewDeferredToView05:01
StevenKAnd it has a comment05:01
StevenK        # The forward adapter approach is not reliable because the object05:02
StevenK        # might not define a permission checker for launchpad.View.05:02
StevenK        # eg. IHasMilestones is implicitly public to anonymous users,05:02
StevenK        #     there is no nearest adapter to call checkUnauthenticated.05:02
wgrantIf there's no adapter then how is it implicitly public?05:03
StevenKzope.Public I guess05:03
wgrantSure, but then the adapter won't be checked05:03
wgrantSo it doesn't matter if it delegates to nothing05:04
wgrantStevenK: When was that comment added?05:04
StevenK14646.4.1 14646.4.6 and 14646.4.205:05
StevenKr14669 on devel05:05
wgrantStevenK: I'd try replacing that and seeing what ec2 thigns05:07
wgrantthinks05:07
wgrantyou can certainly use forwardCheckUnauthenticated in yours05:07
StevenKforwardCheckUnauthenticated is not a method on AuthorizationBase05:09
StevenKwgrant: So I guess I can't, if the method doesn't exist? :-)05:11
wgrantStevenK: It's probably mostly used for edit permissions05:13
wgrantWhere checkUnauthenticated is always false05:13
wgrantI sense an obvious solution05:13
StevenKwgrant: Grep over the tree for forwardCheckUnauthenticated05:14
wgrantI know it doesn't exist today05:14
wgrantBut there was also no way to rename a PPA three hours ago05:14
wgrant:)05:14
StevenKAh, Edit don't use checkUnauthenticated05:15
wgrantRight05:16
wgrantSince anonymous users don't have edit/admin/etc. perms05:16
wgrantWhich is the primary use of delegation05:16
StevenKwgrant: http://pastebin.ubuntu.com/1687202/05:19
wgrantStevenK: Right05:20
StevenKTempted to refactor slightly05:20
wgrantProbably a good idea05:20
StevenKSince both forward methods are roughly identical05:21
StevenKwgrant: http://pastebin.ubuntu.com/1687235/05:24
wgrantStevenK: I'd say _getNext, but yeah05:26
StevenKSure, but it does a bunch of asserts and checks05:27
wgrantBut it doesn't actually do the forwarding05:27
wgrantThe current method name says it does05:27
StevenKSo the docstring lies too?05:29
wgrantThe forwarding bit is the call to checkAuthenticated05:29
StevenKwgrant: Tossing it at ec205:32
StevenKI may forgive you at some point for stealing r16500 :-P05:33
wgrantUnlikely05:34
lifelesssurely 16384 was more important05:41
wgrantThat's why I always get both 1000 and 1024 on new projects05:41
StevenKbzr log doesn't tell me the commit id05:41
StevenKJust that PQM commited it, which is unhelpful05:42
StevenKBut I think it's Curtis05:42
wgrantWhy do you want the ID?05:42
lifelessStevenK: -n0 ? --show-revids ?05:42
StevenKwgrant: Because I don't keep the commit history in my head, like you do :-P05:42
wgrantIf you want to know who it was, then -n0 is what you want, as lifeless says05:43
wgrantThough --show-ids would probably also work, as you could see the RHS parent05:43
StevenKparent: curtis.hovey@canonical.com-20121220230354-8t4pd8cx4jkztgga05:44
StevenKRight05:44
StevenKwgrant: I thought we destroyed the blueprint dropdown for being horrible?06:03
wgrantStevenK: I thought it was removed from +supersede, but it may just have had the timeout fixed06:09
StevenKI can recall a critical about ubuntu blueprints and a dropdown06:10
stubCan we use a cookie as a quick hack to fix the longpoll blocking issue?06:42
stubJust a counter - if it is higher than a threshold, do no long poll. If it is lower, increment it, do longpoll, decrement it when result in06:43
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
=== teknico_ is now known as teknico
=== gary_poster|away is now known as gary_poster
=== Guest47530 is now known as benji
=== almaisan-away is now known as al-maisan
=== wedgwood_away is now known as wedgwood
=== al-maisan is now known as almaisan-away
=== Ursinha-afk is now known as Ursinha
=== yofel_ is now known as yofel
=== almaisan-away is now known as al-maisan
=== Ursinha is now known as Ursinha-afk
=== al-maisan is now known as almaisan-away
=== Ursinha-afk is now known as Ursinha
=== wedgwood is now known as wedgwood_away
=== wedgwood_away is now known as wedgwood
=== wedgwood is now known as wedgwood_away
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/new-perm-for-archive-subscribers-fixed/+merge/149464 is ready for a review23:56

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