/srv/irclogs.ubuntu.com/2012/07/05/#launchpad-dev.txt

wgrantStevenK: Indeed :(00:01
wgrantStevenK: It's a bit unfortunate that Storm doesn't let us have lazy columns.00:02
wgrantAnd that review is done.00:06
StevenKwgrant: How do I declare an array col?00:50
wgrantStevenK: List00:53
wgrantList(type=Int()) is probably what you want00:53
huwshimiwgrant: Did you fix the search speed?01:07
huwshimiWell, whoever did, it's amazing!01:16
rick_h_huwshimi: adeuring worked on that recently01:16
rick_h_the fulltext search stuff?01:16
huwshimirick_h_: Ah right. It's so good!01:17
huwshimiIt might just be the fastest action on Launchpad...01:17
StevenKwgrant: I have a bunch of failures because the test suite is assuming the owner can access private branches01:23
wgranthuwshimi: Bug searches? Yeah, they're a few times faster now, it's nice.01:28
wgrantThe speed improvements are mine, the less obtuse text search is Abel's.01:28
huwshimiwgrant: Well, thanks a lot!01:29
wgrantIt's still about twice as slow as it's meant to be, but I'll hopefully work that out some time this year :)01:30
huwshimiwgrant: I didn't know we could load pages that quickly, already.01:32
wgrantHeh01:32
huwshimiJust with the roundtrip, template render etc.01:33
StevenKwgrant: Considering throwing in an owner clause to get_branch_privacy_filter()01:35
wgrantStevenK: Shouldn't the owner have a grant on creation, because it has a subscription automatically?01:35
lifelesshuwshimi: hah01:36
lifelesshuwshimi: its not all doom and gloom; lots of hard work tho01:36
wgranthuwshimi: The minimum server-side render time for a full page with auth and template rendering is around ~200-250ms. We really need to fix our stack.01:37
StevenKwgrant: Hah, I've just had a thought -- I wonder if these test failures will die due to the sampledata changes in drop-branch-populate-aag.01:37
wgrantAnd we also need slaves in the US :)01:37
wgrantStevenK: Indeed, probably!01:37
* StevenK wields make schema to find out01:38
huwshimilifeless: Well, it's paying off!01:38
StevenKhuwshimi: The sharing pages are among the quickest in LP, too01:39
StevenKwgrant: Running makeBranch(owner=owner, information_type=USERDATA) in a harness gives access_grants = {}01:50
wgrantStevenK: I suggest working out why.01:50
wgrantStevenK: It's possibly because it transitions the information type after creating the subscription, and the transition doesn't create grants.01:51
StevenKwgrant: IBranchNamespace.createBranch will only subscribe if there is a BVP01:54
StevenKWhich doesn't help much for the testsuite01:54
StevenKWe can subscribe the owner if information_type is not None in the factory01:54
wgrantAh01:55
wgrantNot only does it not help for the test suite, but it also ruins all of our plans.01:56
StevenKWell, it pulls teams from the BVP and subscribes them all01:58
wgrantStevenK: Huh?01:59
wgrantThat's not the relevant bit here.01:59
wgrantStevenK: I've just checked, and even public branches get a default subscription for the owner.02:00
wgrantThe BVP subscription stuff is for granting others access.02:00
wgrant        branch.subscribe(02:00
wgrant            self.owner,02:00
wgrantRight after the BVP sub.02:00
StevenKAh02:00
StevenKThen why is branch.access_grants = {} :-(02:00
wgrant        if information_type is not None:02:01
wgrant            naked_branch.transitionToInformationType(02:01
wgrant                information_type, registrant, verify_policy=False)02:01
wgrantProbably because of that.02:01
wgrantSee the         if information_type in PRIVATE_INFORMATION_TYPES:02:02
wgrantsection of Bug.transitionToInformationType02:02
wgrantIt's probably missing from Branch.transitionToInformationType02:02
StevenKwgrant: And missing_subscribers = set([who, self.owner]) ?02:03
wgrantStevenK: That's a difficult question.02:05
wgrantStevenK: I don't think so.02:05
wgrantThe owner certainly shouldn't be implicitly subscribed.02:05
wgrantThe actor probably should be.02:05
=== jamesh__ is now known as jamesh
StevenKwgrant: Adding a missing_subscribers = set([who]) and subscribing still ends up with access_grants = {}02:10
wgrantStevenK: Did you add the ensureAccessGrants bits?02:11
StevenKwgrant: I have now, still {}02:31
StevenKWoot, access_grants = {243652}02:37
wgrantStevenK: What'd you change?02:52
StevenKwgrant: Moved the ensureAccessGrants() section after we set information_type and call _reconcileAccess()02:53
wgrantAh, yes, that's fairly critical :)02:53
StevenKwgrant: Is test_owner_member_sees_own_branches in test_branchcollection complete crack?04:28
StevenKIt creates a private branch by stacking on a existing private branch, then unsubscribes the owning team and then asserts the team owner can still see the branch.04:29
wgrantStevenK: Right, that test no longer makes sense, as we've changed the rules.04:29
* StevenK bins it04:29
StevenKwgrant: The only failure left is test_initial_branches_does_not_contain_private_dev_focus_branch in code/browser/tests/test_product.py04:30
wgrantStevenK: I would suggest making it not fail.04:34
StevenKObviously.04:35
StevenKI just don't get why it does fail, I thought CIV() with no principal was anonymous04:35
lifelessIts been replaced.04:36
lifelessWith CV()04:36
StevenK*facepalm*04:37
StevenKOh, DUH04:46
StevenKThe bloody tests calls login() in the method to create the branch04:47
StevenKwgrant: So it looks like this branch is creating a private development focus for a product and then assuming it can't be seen.04:48
StevenKs/branch/test/04:48
wgrantStevenK: I got that idea from the name, yaeh.04:48
StevenKConsidering replacing the login() call with 'with person_logged_in(...)' but that may have other knock-on effects.04:49
wgrantThe bigger question is perhaps why this only makes it break now.04:49
StevenKIt calls check_permission on the dev focus, which calls visibleByUser() and I have changed that method a lot04:50
wgrantRight.04:51
wgrantBut that suggests that the login() call is not the problem.04:51
wgrantOr the test was buggy before.04:51
StevenKTossing a login(ANONYMOUS) before the call to create_initialized_view() fixes the test.04:51
StevenKI'm not sure how this test ever worked properly.04:53
wgrantStevenK: Ah04:57
wgrantI just read the code04:57
wgrantNow it is clear04:57
wgrantStevenK: It explicitly logs in as the product owner, not the branch owner.04:58
wgrantStevenK: Recall that product owners now have an APG by default.04:58
StevenKHaha, which we now allow04:58
StevenKDue to the visibleByUser() changes04:58
wgrantPrecisely.04:59
wgrantSo you can either log in as another user or remove the APG04:59
StevenKlogin(ANONYMOUS) it is then04:59
StevenKwgrant, wallyworld: https://code.launchpad.net/~stevenk/launchpad/new-branch-visibility/+merge/11348405:21
wgrantStevenK: Did you look into using BranchCollection to implement Branch.visibleByUser?05:23
StevenKNot really, I didn't see how it could be a win05:24
wgrantIt removes code duplication.05:24
StevenKwgrant: By calling IAllBranches.visibleByUser?05:28
wgrantStevenK: BranchCollection sadly doesn't provide a means to filter by ID or URL, so it may not be doable at this stage.05:30
StevenKwgrant: branch_filter_expressions=[Branch.id == self.id] ?05:32
wgrantStevenK: Oh, I lie, getUtility(IAllBranches).withIds(self.id).visibleByUser(user).is_empty() should work05:33
StevenKwgrant: http://pastebin.ubuntu.com/1075921/ ?05:36
StevenKHm, we can probably refactor further, and feed a list of the current branch and all branches stacked on it05:37
wgrantWell05:39
wgrantIt's not clear whether we should preserve that behaviour at that level.05:39
StevenKIt's current behaviour at least05:39
StevenKwgrant: http://pastebin.ubuntu.com/1075926/05:43
StevenKSigh, modulo a one character typo05:43
wgrantStevenK: That doesn't make much sense.05:43
wgrantThe visibility of a branch might depend on the branches it's stacked on.05:44
wgrantIt certainly does not depend on the branches that are stacked on it.05:44
StevenKThat was the intent05:45
StevenKwgrant: Does http://pastebin.ubuntu.com/1075932/ make you hate me?05:50
wgrantStevenK: That probably won't work, since it's unlikely you can check the stacked_on of a branch you don't have access to.05:51
wgrantYou probably need to preserve the original behaviour.05:51
wgrantJust replacing _checkBranchVisibleByUser with the branchcollection thing05:52
wgrants/behaviour/structure/05:52
StevenKYeah :-(05:52
StevenKI suspect WithIds wants a list, though05:53
StevenKHmm, not sure05:54
StevenKwgrant: Diff updated.06:09
wgrantStevenK: r=me, but please do some data checks on prod before landing06:12
StevenKwgrant: Such as checking all private branches have some AAGs? Or what did you have in mind?06:13
wgrantStevenK: Actually, why not inline the branchcollection usage into visibleByUser?06:13
StevenKHm, good point.06:13
wgrant_checkBranchVisibleByUser is now one statement, and it only has one callsite06:13
StevenKLet's do that.06:13
wgrantMight as well inline06:13
wgrantSave another few lines.06:13
wgrantGet you to -15 or so06:13
StevenK-1706:14
StevenK-18, in fact, because I'm an idiot06:16
StevenKwgrant: Which is fantastic, because I've wanted _checkBranchVisibleByUser dead for a while.06:18
StevenKwgrant: What data checks did you have in mind?06:22
wgrantStevenK: The ones I was thinking of don't really work06:23
wgrantSo let's JFDI06:23
* StevenK tosses it at ec206:24
adeuringgood morning07:41
=== matsubara-afk is now known as matsubara
StevenK_StringException: Text attachment: garbage08:41
StevenK------------08:41
StevenK[<storm.databases.postgres.PostgresConnection object at 0x168662d0>]08:41
StevenKwgrant: ^ have you seen that on ec2?08:41
wgrantStevenK: buildbot saw that twice last week.08:44
wgrantIt's spurious.08:44
StevenKBut it will mark the branch as failed, which is annoying08:47
cjwatsonAny thoughts on a nice way to export the list of custom files in a PackageUpload?  lp.soyuz.scripts.queue currently does:10:07
cjwatson        for queue_custom in queue_item.customfiles:10:07
cjwatson            self.display("\t | * %s Format: %s"10:07
cjwatson                         % (queue_custom.libraryfilealias.filename,10:07
cjwatson                            queue_custom.customformat.name))10:07
cjwatsonI exported URLs for the library files as PU.customFileUrls(), but maybe it should've been .customFiles() that returns a list of (URL, format) tuples or something ...10:08
wgrantThat might be best, indeed.10:09
cjwatson(It's on devel exactly so that we can change it ;-) )10:09
wgrantYup10:09
=== daker__ is now known as daker_
=== daker__ is now known as daker_
=== matsubara is now known as matsubara-afk
cjwatsonHmm, OTOH that would mean every 'queue info' would have to make a customFiles call just to find out whether there were any11:00
cjwatsonMaybe it would make more sense to fold it into getBinaryProperties11:00
danilosheya, I've got 3 MPs up for different workitem-related stuff12:04
danilosif anyone feels review-happy, there you go :)12:04
jamgmb: for the addSkip thing12:11
jamshould it be falling back to addSuccess?12:11
gmbUm.12:11
jamAIUI that is what testtools in 2.6 is doing12:11
gmbjam. A thousand botherations. Yes, it should. Good catch (and that'll teach me for self-reviewing)12:11
jamotherwise, I think you break the subunit stream12:11
jamin the way that it broke for 2.712:11
gmbjam, I don't - it handles the skip properly12:12
gmbIt just doesn't call up to the parent class.12:12
gmbActually, hmm..12:12
gmbjam, They way it is now, it skips properly when using --subunit12:12
jamit is possible that self.options.output.test_skip is doing the right output.12:12
gmbjam, It is... it's just not incrementing the counter on unittest.TestResult, which doesn't exist.12:13
gmb(For py 2.6)12:13
jamgmb: ah ok. the other thing to watch out for is double-counting, but yeah, I think calling something on the super() class is useful.12:14
jamgmb: we just need a # py 2.6 comment there, so we know we can nuke all that code in the future12:14
jam:)12:14
gmbRight :)12:14
gmbAmusingly, the zope.testing test suite breaks horribly under 2.6.12:14
gmb*sigh*12:14
gmbBut I'll go and make that change so that we fall back.12:14
jamgmb: so you can't actually run the zope.testing suite in 2.6? ugh12:15
gmbExactly.12:15
gmbYou can run bits of it12:15
gmbBut not all of it.12:15
gmbSo "assertIn()" for example has to not be used :/12:15
jammgz: I see a bunch more of your patches have landed. kudos12:18
mgzjam: I shall run the kanban update again and see if they're done-done12:31
jammgz: well, it hasn't been deployed to prod12:31
jamso I think it shouldn't be12:31
mgzyup, Deployment::Ready is the state12:32
rick_h_jcsackett: just soyuz and translation left :) https://code.launchpad.net/~rharding/launchpad/registry_yui35/+merge/11340712:42
rick_h_jcsackett: I tried to comment the actual changes vs moving as much as possible so it's a long MP, but itemized to help.12:42
cjwatsonwgrant: https://code.launchpad.net/~cjwatson/launchpad/queue-api-custom-files/+merge/113574 ?13:11
deryckadeuring, https://plus.google.com/hangouts/_/040bd7afe73bdcaf379359f9eb707488709b7abd?authuser=0&hl=en13:30
deryckrick_h_, https://plus.google.com/hangouts/_/040bd7afe73bdcaf379359f9eb707488709b7abd?authuser=0&hl=en13:32
=== jcsackett changed the topic of #launchpad-dev to: http://dev.launchpad.net/ | On call reviewer: jcsackett | Firefighting: - | Critical bugs: 4.0*10^2
danilosjcsackett, hi, I've got a couple of MPs up, can you please take a look at them on +activereviews?14:19
danilosjcsackett, fwiw, I am around for any questions in the next few hours14:19
jcsackettdanilos: dig. i'm working through the queue.14:19
danilosjcsackett, cool, thanks14:19
nigelbDid the bzr team get merged back into LP?14:58
nigelbOr something of that sort.14:58
mgzyeah, of that sort.14:59
rick_h_abentley: so all three JS tests just passed in yui3.5 w/o even opening them.15:14
abentleyrick_h_: Good news: all passed.  Bad news: all = 3. :-)15:15
rick_h_hah15:15
rick_h_well three files15:15
rick_h_looks like 28 actual tests15:15
abentleyrick_h_: Well, that's good then.15:17
=== salgado is now known as salgado-lunch
=== matsubara-afk is now known as matsubara
=== salgado-lunch is now known as salgado
czajkowskimpt: where would we be without you :016:53
czajkowski:)16:53
rick_h_jcsackett: quick one for you for a change when you get a chance: https://code.launchpad.net/~rharding/launchpad/fix_attr_quotes/+merge/11361016:54
mptIn a world that was slightly more confusing but otherwise just the same16:54
czajkowskiand no spam :)16:54
ivoryjcsackett: i could use a rievew: https://code.launchpad.net/~ivo-kracht/launchpad/bug-728129/+merge/11361217:17
jcsackettivory: your up next as soon as i finish my current.17:18
ivoryjcsackett: thank you, chances are that i'm not online anymore by then since it's quite late now and it's my last day of my internship. questions go to adeuring then :)17:22
cjwatson$ bzr damage17:25
cjwatsonUsing submit branch /home/cjwatson/src/canonical/launchpad/lp-branches/devel17:25
cjwatsonHealing: 2007 lines of code17:25
cjwatson^- I like the look of this17:25
cjwatsonAnd I can even land that after my three queue-api-* MPs are reviewed and deployed ;-)17:36
rick_h_jcsackett: ty much for the trio of reviews today17:58
rick_h_cjwatson: LoC credit coming down the pipe?17:58
cjwatsonrick_h_: stand back17:58
rick_h_cjwatson: LoC assassnator!17:59
rick_h_escept with better spelling and all that17:59
=== heroux_ is now known as heroux
adeuringjcsackett: could you please do a "follow-up" review of Ivo's MP: https://code.launchpad.net/~adeuring/launchpad/bug-728129/+merge/11363119:20
jcsackettadeuring: cool, can you verify if the test_decoratedresultset.py file is even needed? it look like it's to collect the doctest, but that doctest already exists and runs without thie test_*py file.19:21
adeuringjcsackett: yes, we need some way to get the doc test in the tests/ directory executed. WIthout this file, the doc test is simply ignored.19:22
adeuringjcsackett: note that there is another fle decoratedresultset.txt, but in the directory doc/, which is at oresent executed.19:23
jcsackettadeuring: dig. r=me then.19:25
adeuringjcsackett: cool, thanks, also in Ivo's name!19:25
abentleylifeless: Have you seen https://dev.launchpad.net/Code/RecipeBuildDebversioning ?  The more I think about it, the more it seems like a recipe build should supersede any other packaging by default, because if you don't want the recipe version, you remove the package & PPA.20:04
lifelessI saw you make it yesterday, I think.20:05
lifelessYour logic makes sense to me. Its complicated by apt/dpkg behaviour but not something we can really solve.20:05
lifelessby which I mean, being a slightly higher version is a good idea. But removal is more complicated (and there are special tools to use to do that).20:06
abentleyjames_w: Could you comment on https://dev.launchpad.net/Code/RecipeBuildDebversioning ?20:22
=== salgado is now known as salgado-afk
=== matsubara is now known as matsubara-afk
=== jcsackett changed the topic of #launchpad-dev to: http://dev.launchpad.net/ | On call reviewer: - | Firefighting: - | Critical bugs: 4.0*10^2
lifelessbbiab21:52
cjwatsonjcsackett: thanks for the cluster of reviews22:31
jcsackettcjwatson: you're welcome. :-)22:32
* cjwatson runs three parallel ec2 lands, what could possibly go wrong22:32
jcsackettcjwatson: generally, that all works fine. as long as your branches weren't secretly dependent on each other. :-P22:43
cjwatsonI don't *think* they were22:44
cjwatsonwill be a fun QA opportunity tomorrow though22:44
StevenKwgrant, wallyworld: http://pastebin.ubuntu.com/1077299/23:09
StevenKFAILED (id=1, failures=662 (-3231), skips=2)23:20
StevenKProgress!23:20

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