/srv/irclogs.ubuntu.com/2012/06/04/#launchpad-dev.txt

wallyworld_wgrant: the recent apa model code - i haven't looked in detail, but it doesn't seem to update the access_policies or access_grants columns of bug task flat?01:14
wgrantwallyworld_: BugTaskFlat will continue to be trigger-maintained in perpetuity, as it's still not feasible to hook or even identify all the relevant app code.01:15
wallyworld_wgrant: so we still need to separate out the btf triggers then01:16
wgrantwallyworld_: They're deliberately already separate01:16
wgrant    bug_maintain_bug_summary_trigger AFTER DELETE OR UPDATE ON bug FOR EACH ROW EXECUTE PROCEDURE bug_maintain_bug_summary()01:16
wgrant    bug_mirror_legacy_access_t AFTER INSERT OR UPDATE ON bug FOR EACH ROW EXECUTE PROCEDURE bug_mirror_legacy_access_trig()01:16
wallyworld_hmmm. i thought the btf code and apa stuff just added to the model was in the same trigger01:17
wgrantNope.01:17
wgrantBTF is entirely separate.01:17
wgrant    accessartifactgrant_maintain_bugtaskflat_trigger AFTER INSERT OR DELETE OR UPDATE ON accessartifactgrant FOR EACH ROW EXECUTE PROCEDURE accessartifact_maintain_bugtaskflat_trig()01:17
wgrant    accesspolicyartifact_maintain_bugtaskflat_trigger AFTER INSERT OR DELETE OR UPDATE ON accesspolicyartifact FOR EACH ROW EXECUTE PROCEDURE accessartifact_maintain_bugtaskflat_trig()01:18
wgrantetc.01:18
wallyworld_ok, i'll look elsewhere to see why btf is not being maintained with legacy triggers disabled01:18
wgrantWhat sort of operation are you performing?01:18
wallyworld_a search01:18
wgrantAnd what does the failure look like?01:18
wgrantAnd which triggers are you disabling?01:18
wallyworld_not a failure - a former grantee is still being returned01:19
wallyworld_after calling transition to target01:19
wgranttransitionToTarget won't change grantees.01:19
wgrantIt might change policies.01:19
wallyworld_am disabling bugtask_mirror_legacy_access_t etc01:20
wallyworld_yes, an a person with a olicy grant should then no longer see the bug01:20
wgrantDo you have a diff?01:20
wgrantRight.01:20
wallyworld_i'll look into it a bit to see what's happening01:20
wgranttransitionToTarget will call updateAccessPolicyArtifacts, which will remove the row from AccessPolicyArtifact, which will cause the trigger to update BugTaskFlat.01:21
wallyworld_that's what i was expecting01:21
StevenKwgrant, wallyworld_: https://code.launchpad.net/~stevenk/launchpad/set-spph-packageupload/+merge/10851301:26
wallyworld_ugh, soyuz, pass01:28
StevenKHahaha01:28
StevenKwallyworld_: You said you want to learn it :-P01:28
wallyworld_not today though01:28
StevenKwallyworld_: It's only a 17 line query, that's *tiny* :-P01:29
wgrantStevenK: I'd check that PU.changesfile IS NOT NULL to make sure it's a real upload.01:29
wgrantAlso perhaps check that it's the earliest SPPH for that SPR01:29
StevenKwgrant: Do we care? We'd get a hold of some delayed copies PUs too, but I don't think it matters01:29
wgrantStevenK: We want to be conservative here. We can easily detect data that we haven't filled in, but it's harder to detect and correct data that exists but is wrong.01:30
StevenKHmm, I'm not sure how to check it's the earliest SPPH01:31
wgrantSo I'd add both the checks I mentioned. changesfile IS NOT NULL ensures it's a real upload, and restricting to the first SPPH prevents it from incorrectly matching post-upload overrides.01:32
wgrantspph.id = (SELECT MIN(spph2.id) FROM sourcepackagepublishinghistory spph2 WHERE spph2.archive = spph.archive AND spph2.sourcepackagerelease = spph.sourcepackagerelease) or so01:32
StevenKwgrant: Hmm, make sense. Now there's this Storm thing. Let me see.01:36
wgrantEasy in Storm.01:36
StevenKwgrant: Hm, really? My 5 minutes of playing around has yielded nothing.01:40
wgrantspph2 = ClassAlias(SourcePackagePublishingHistory)01:41
wgrantSourcePackagePublishingHistory.id == Select(Min(spph2.id), tables=spph2, where=And(spph2.sourcepackagereleaseID == SourcePackagePublishingHistory.sourcepackagereleaseID, spph2.archiveID == SourcePackagePublishingHistory.archiveID))01:41
wgrantor so01:41
StevenKOh Select()01:42
wgrantThat is how one does a subselect.01:42
StevenKI was trying to do it directly :-(01:42
wgrant(a quick query here shows that there are about 294 publications in oneiric that that will exclude, which seems a little high, but perhaps it's correct)01:43
wgrantAh, forgot to match section01:45
wgrant31, that's more plausible01:45
wgrantStevenK: dogfood confirms that I am correct.01:49
wgrantThere are 30 cases in oneiric where the MIN(spph2.id) bit is required.01:49
wgranteg https://launchpad.net/ubuntu/+source/im-config/+publishinghistory01:49
wgrantNote how it started in universe, was promoted, and then demoted again01:50
wgrantYour query would set both universe publications to the PU01:50
wgrantWhich is a lie.01:50
StevenKwgrant: Yeah. Writing a test for it01:52
wgranthttps://pastebin.canonical.com/67361/01:53
wgrantNote that they all have 2 or 3 publications with the same overrides, except for ppl which was a delayed copy (because I omitted the pu.changesfile IS NOT NULL clause)01:53
wgrantlaunchpad_dogfood=# SELECT COUNT(*) FROM packageupload pu JOIN packageuploadsource pus ON pus.packageupload = pu.id JOIN sourcepackagerelease spr ON spr.id = pus.sourcepackagerelease WHERE pu.changesfile IS NOT NULL AND pu.archive <> spr.upload_archive;01:57
wgrant count01:58
wgrant-------01:58
wgrantSo my other assumption is correct too01:58
wgrant     001:58
wgrant(1 row)01:58
wgrant(PU.changesfile == original upload)01:58
wgrant(PU.changesfile IS NOT NULL => original upload)01:58
lifelessoh right, you guys are working today. Doh! ;)01:58
StevenKwgrant: pu.changesfiles IS NOT NULL will miss PCJs, won't it?02:01
wgrantStevenK: Yes. We can't match PCJs this way.02:01
wgrantWe'd have to match the PCJ to match the PCJ.02:01
StevenKwgrant: http://pastebin.ubuntu.com/1022402/02:31
StevenKNot sure why bzr di things I replaced one of the methods wholesale. :-(02:32
StevenKs/g/k/02:32
wgrantStevenK: Let's see02:32
wgrantwallyworld_: Any luck?02:32
StevenKwgrant: The tests all pass, too, so I don't feel like a complete idiot after my subselect fail.02:33
wgrantStevenK: Possibly better to call spph2 matching_spph or something like that.02:33
wgrant+    def test_PopulateSPPHPU_no_changesfile(self):02:33
wgrant+        # PopulateSourcePackagePublishingHistoryPackageUpload will not02:33
wgrant+        # set a SPPH's packageupload to a non-original upload.02:33
wgrantthat comment could be a bit clearer02:33
wgrantAnd I suspect that common bits of the tests can be factored out02:34
wgrantBut otherwise looks good.02:34
StevenKHmmm, you're right02:34
StevenKLet me do that02:34
wgrantI'd like comments in the non-test code too, though02:34
wgrantIt's currently not exactly obvious to anyone but me why those two bits are there :)02:34
wallyworld_wgrant: no. logging the sql shows an insert and then a delete from AccessPolicyArtifact, but a subsequent search selecting from btf testing (BugTaskFlat.access_policies)&&(SELECT ARRAY_AGG(AccessPolicyGrant.policy) returns true02:35
cody-somervilleJust Curious. Is there a particular reason that is a comment instead of a docstring?02:35
wgrantNot sure. It's Launchpad convention to use a comment.02:35
wgrantwallyworld_: odd. What if you break in the test or commit and inspect the tables?02:36
cody-somervilleDo you guys use nose?02:36
wallyworld_wgrant: yeah, looking into that now02:36
StevenKcody-somerville: We do not.02:36
wgrantwallyworld_: Otherwise throw me a branch/diff and I'll have a poke.02:36
wallyworld_ok, will do after i look into things a bit more02:38
StevenKwgrant: http://pastebin.ubuntu.com/1022422/02:42
wgrantStevenK: "(ie. not a delayed copy or copy job)"02:43
StevenK            # If the changesfile is not None, it is an original upload02:44
StevenK            # (IE. not a delayed copy, or package copy job.)02:44
wgrantSounds reasonable.02:44
StevenKwgrant: Diff updated.02:50
wgrantLooking02:53
wgrantStevenK: You'll need indices02:57
StevenK:-(02:58
wgrantOtherwise it seems to just go for a seq scan every time.02:58
wgrant"CREATE INDEX temp_spph ON sourcepackagepublishinghistory USING btree (id) WHERE packageupload IS NULL;"03:01
wgrantis probably all that's going to give us a wonderful result.03:01
wallyworld_wgrant: i found the problem - there was some previous code which may have been cut and pasted and which did [self] instead of [self.bug] and so the wrong id was being used in the searches03:05
wgrantwallyworld_: Ouch, where?03:06
wgrantUsing a task instead of a bug?03:06
wallyworld_it was my code - i just can't quite recall which of the pipes in went into first - it is not landed yet, and the test it was in was failing due to waiting for the apa stuff to go in03:07
wgrantAh, right.03:07
wgrantI didn't think I did anything like that anywhere.03:07
wallyworld_so oen failure was masking another problem03:08
wallyworld_although i have found an issue - the createAccessGrants method in the sharing service will fail if the grants already exist03:09
wallyworld_so i need to fix that or else it will blow up when f flag is turned off but the triggers are still enabled03:09
wgrantwallyworld_: btw, did you see lp.testing.dbtriggers? I guess you probably won't want to merge them now, so I'll sort it out once your stuff is landed.03:15
wallyworld_wgrant: no, didn't see that yet03:16
wallyworld_wgrant: you obviously didn't see my DisableTriggerFixture03:18
wgrantwallyworld_: Not until afterwards -- it's not in trunk yet.03:19
wallyworld_oh really!? :-(03:19
wallyworld_didn't realise that03:19
wallyworld_but makes sense03:19
wgrantwallyworld_: Bug #1007984 may be of interest03:49
_mup_Bug #1007984: BugTask:+index information type widget doesn't handle failure <disclosure> <javascript> <regression> <ui> <Launchpad itself:Triaged> < https://launchpad.net/bugs/1007984 >03:49
wallyworld_me or StevenK?03:49
wgrantBoth03:49
wallyworld_but it's more fun to make him to javascript stuff :-)03:50
wallyworld_s/to/do03:50
wgrantTrue.03:50
wallyworld_i know how much he loves it03:50
bigjoolsJS was invented by Lucifer himself03:53
wallyworld_i don't mind it now03:55
wgrantYou've clearly been infected.03:56
bigjoolswallyworld_:  I figured out that it's a really good idea to re-flush the Breville after the clean cycle.  Bleargh....03:58
wallyworld_bigjools: that's what she said in -ops this morning03:58
wallyworld_wgrant: when do you plan on doing updateAccessPolicyArtifacts for branches?04:15
StevenKwgrant: Did you see https://code.launchpad.net/~stevenk/launchpad/spph-packageupload-index/+merge/108515 ?04:16
StevenKwgrant: I'm going to hold off on landing set-spph-packageupload until the index is on prod, thanks for the +104:17
wgrantwallyworld_: Refactoring mostly done.04:17
wgrantShuffling around tests to make them less heinous now04:17
StevenKwallyworld_: I don't understand enough about ChoiceSource, I guess, which is why that bug exists.04:18
wallyworld_wgrant: ok, afaict as soon as that gets in all the tests in my ueber branch should pass hipefully04:18
wgrantwallyworld_: Marvellous.04:18
wallyworld_StevenK: i'll do it, i just wanted to get a reaction from you04:18
StevenKwallyworld_: I'd be interested to see the diff04:19
wallyworld_np, will do04:19
StevenKwallyworld_: Besides, it's über ...04:21
wallyworld_StevenK: ue or ü are aceptable04:22
wgrantOnly if you're on Windows.04:22
wgrantEverywhere else has easy ways to enter ü, so there's no excuse.04:22
StevenKI had to set my compose key :-(04:23
wallyworld_sigh, i can type ue fatser than ü04:23
wallyworld_same with ae, oe04:23
wallyworld_you would have had a point if ue was somehow wrong04:23
wallyworld_wgrant: when you have a minute, a small one, hopefully last branch in the ueber branch pipeline https://code.launchpad.net/~wallyworld/launchpad/createAccessGrants-robust/+merge/10851804:30
wgrantRAlt+" u isn't that much slower :)04:30
wallyworld_extra key presses04:31
wgrantwallyworld_: approved04:32
StevenKwallyworld_: What about ç?04:33
wallyworld_smartarse :-P04:33
wallyworld_wgrant: thanks04:33
StevenKwallyworld_: Or ö?04:34
wgrantwallyworld_: What's the diffstat for the end of the pipe up to?04:34
wallyworld_wgrant: i forget the command to get a merge preview diff04:36
wallyworld_StevenK: oe ===  ö04:36
wgrantNow now04:37
wgrant== maybe04:37
wgrantNot ===04:37
wallyworld_sticky fingers04:37
StevenKJS disease04:38
StevenKwallyworld_: ä? :-)04:38
wgrantae04:38
wallyworld_what he said04:38
wgrantNot to be confused with æ04:39
StevenKHaha04:39
StevenKI've forgotten how to type that one04:39
StevenKæ04:39
wgrantCompose+a e04:39
wgrantNot too hard :)04:39
StevenKHm, so that works. :-)04:39
StevenKwgrant: I wonder if spph.source_package_name can be murdered yet.04:48
wgrantStevenK: API04:49
StevenKWhat? It's exported?04:49
wgrantIt's the only way to get the name of the source package through the API.04:49
wgrantThat's the reason it was created.04:49
StevenKCan't we just point it at self.sourcepackagename?04:50
wgrantThat's no string04:50
wgrantThat's an object04:50
wgrantAn unexported object!04:50
lifelessyou want to export SPN? die fiend04:50
StevenKself.sourcepackagename.name then04:50
wgrantYou'll find that looks remarkably like source_package_name04:51
wgrantie. that should be identical to what it is today.04:51
StevenKwgrant: It's still using self.sourcepackagerelease04:51
wgrantAh, right.04:51
wgrantYou can fix that if you really want.04:52
StevenKIt's that, or beating my head against Django04:52
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/denorm-spph-source_package_name/+merge/10852005:05
wgrantStevenK: Did you identify and fix the preloading callsites?05:06
StevenKThere are preloading callsites? :-(05:06
wgrantThere should be.05:06
wgrantAnything that exposes that over the API is going to want to preload the SPN05:07
wgrantIt's possible that it doesn't; if you can't find any, file a bug.05:07
StevenKwgrant: greping for \.source_package_name is mostly turning up DSDs, which are a whole other barrel of laughs, and tests.05:09
wgrantStevenK: I'd hope so05:09
wgrantSince they won't be touching that directly.05:10
StevenKThe current code wouldn't have pre-loaded SPR?05:11
wgrantwut?05:11
StevenKwgrant: SPPH.source_package_name is exported and grabs it via SPR.05:12
wgrantStevenK: Yes.05:12
wgrantSo code will be preloading SPR and SPR.spn05:12
StevenKwgrant: Right, it's SPR.sourcepackagename, so maybe a grep for \.sourcepackagename will be better05:15
StevenKwgrant: I can not see anything related besides the dominator that uses load_related() over SPR05:23
wgrant:(05:23
wgrantIgnore, I guess05:23
StevenKBMP and bugtask05:24
StevenKBut I'm not sure how that fits in05:24
wgrantIt doesn't.05:24
StevenKwgrant: Can haz +1, or you no longer care and I should self-review?05:30
wgrantStevenK: I'm not sure that it's an immensely valuable change.05:30
wgrantBut if you want to do it then it's probably a self-review.05:31
StevenKwgrant: You don't think dropping SPR out of the chain is valuable?05:31
wgrantWe don't have a really good set of policies around the use of denormalised data.05:32
StevenKI thought the policy was effectively "denormalised data is good, we should use it"05:32
wgrantwin 305:39
* StevenK stabs Django06:42
StevenKError: Can't find the file 'settings.py' in the directory containing '/home/steven/auditorfixture/eggs/auditor-0.0.1-py2.7.egg/auditor/manage.pyc'. It appears you've customized things.06:43
StevenK-rw-rw-r-- 1 steven steven 4.0K Jun  4 16:39 /home/steven/auditorfixture/eggs/auditor-0.0.1-py2.7.egg/auditor/settings.py06:43
=== almaisan-away is now known as al-maisan
adeuringgood morning09:28
=== al-maisan is now known as almaisan-away
frankbanlifeless: ping10:38
=== almaisan-away is now known as al-maisan
=== benji changed the topic of #launchpad-dev to: http://dev.launchpad.net/ | On call reviewer: benji | Firefighting: - | Critical bugs: 3.47*10^2
deryckMorning, all.13:04
=== al-maisan is now known as almaisan-away
=== nhandler_ is now known as nhandler
=== salgado-lunch is now known as salgado
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
cjwatsonCould I have "Status: Approved" on https://code.launchpad.net/~cjwatson/launchpad/db-packageset-score-rename/+merge/108336 so that I can land it?21:39
james_wlifeless, should cjwatson be added to https://launchpad.net/~canonical-launchpad-committers ?21:46
james_wcjwatson, toggled, assuming it was just a formality21:47
cjwatsonSo I understand - thanks21:49
sinzuijcsackett, StevenK, mumble22:20
wgrantwallyworld_: http://pastebin.ubuntu.com/882822/22:32
=== benji changed the topic of #launchpad-dev to: http://dev.launchpad.net/ | On call reviewer: - | Firefighting: - | Critical bugs: 3.47*10^2
lifelessjames_w: I'm not here today; sick, but he probably meets the criteria I set out in my mail to canonical-launchpad23:16

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