/srv/irclogs.ubuntu.com/2013/01/23/#launchpad-dev.txt

StevenKwgrant: Ha. Hahaha00:04
=== yofel_ is now known as yofel
=== slank is now known as slank_away
wgrantStevenK: Going well?00:37
StevenKStill making a list of pages to hit up00:40
wgrantAh00:46
StevenKTrying to find a projectgroup on qas that uses blueprints00:48
wgranthttps://qastaging.launchpad.net/heehee00:49
lifeless!00:50
StevenKwgrant: So that's Person, Product, ProductSeries, Milestone, Distribution, DistroSeries, and Sprint checked.00:53
StevenKheehee has no blueprints, and something with private blueprints would be nice.00:53
wgrantStevenK: It does, you might just not be able to see them00:53
wgrantprop-auditorclient is in it00:54
wgrantAnd I added a private blueprint to it last week to check this exact thing00:54
StevenKYeah, I can't view prop-auditorclient00:54
wgrantI've made it public00:54
wgrantThe project group now correctly shows an empty blueprint list for an anonymous user00:55
wgrantSo it looks fixed00:55
StevenKI still get the message for me00:55
wgrantWhich message?00:55
StevenK"... Register the first blueprint in this project! If you have a proposal for a feature ..."00:55
wgrantThat's the empty blueprint list :)00:56
StevenKNot so much a list as a wall of text00:56
wgrantI believe it is the largest wall of text in the entire application, indeed00:56
wgrant(ignoring help popups)00:56
StevenKI still can't see the blueprint for prop-auditorclient, but eh00:57
StevenKOh, projectgroup didn't check for privacy. Right.00:58
StevenKNow it does, since I made it do so.00:58
wgrantExactlyu00:59
wgranti've just shared the project with you00:59
wgrantSo you should be able to see the spec00:59
StevenKAnd I can00:59
StevenKFantastic00:59
* StevenK goes to mark bugs as qa-ok00:59
StevenKDid you want a deployment?00:59
wgrantIndeed00:59
wgrantI'm about to disappear out to lunch, so if you could arrange that...00:59
wgrantAlso, if it happens while I'm gone, do keep an eye on buildd-manager01:00
StevenKI'll sort it out01:00
StevenKwgrant: http://pastebin.ubuntu.com/1561501/02:58
wgrantStevenK: Does it work?03:00
StevenKThe tests pass03:01
StevenKI fear it doesn't close danilos bug03:01
wgrantStevenK: H, though the privacy filter should be in the recursive query, not the outer one03:03
wgranteg. if we have A->B->C and I can't see B, I think this will do strange things03:03
wgrantwhereas if the filter's in the recursive bit, then I will just see A, not A and C03:03
StevenKwgrant: Right03:04
StevenKAnd both recursive_dependent_query and recursive_blocked_query are just a string03:06
wgrantMaybe not for long :)03:06
StevenKYeah03:06
wgrantOtherwise you can use that compilation thingy03:06
wgrantconvert_storm_clause_to_string03:06
StevenKwgrant: The inner SELECT from the UNION requires the privacy check?03:07
wgrantI haven't actually looked at the recursive query03:07
* wgrant looks03:07
StevenKWhich is on specificationdependency :-/03:07
wgrantYeah, so you'll probably want to adjust the second half of each union to do the filtering.03:08
wgrantI didn't realise it was only over specificationdependency, which makes it a bit awkward03:08
wgrantBut it shouldn't be too bad.03:08
StevenKSo I have to join back to spec and then feed in get_specification_privacy_clause?03:10
wgrantStevenK: Right.03:18
StevenKHmmm, on specification on dependency, though03:19
wgrantHm?03:19
StevenKspecificationdependency has specification and dependency, both of which are specification03:19
wgrantWhichever one it returns03:20
wgrantWhich will be one for blocked, and the other for deps03:20
StevenKHm, my query is broken03:39
StevenKwgrant: http://pastebin.ubuntu.com/1561618/04:07
* wgrant cries04:10
StevenKwgrant: Hm?04:10
wgrantStevenK: a) It's illegal to construct SQL with %. Legacy code is permitted as long as it's of the form "% sqlvalues(...)", but nothing else. Try using SQL() instead.04:11
wgrantb) Have you verified the constructed SQL?04:11
wgrantWhat does convert_storm_clause_to_string do when given multiple args?04:11
StevenKIt isn't, it's either an [Or()] or a [In()]04:12
wgrantAh04:12
wgrantStill, examine the constructed SQL04:12
StevenKwgrant: http://pastebin.ubuntu.com/1561630/04:14
wgrantStevenK: lolwut04:15
wgrantOh, misread04:15
wgrantStevenK: What doesn't it do?04:16
StevenKOh?04:16
wgrantThere's no actual SELECT there04:16
wgrantJust a WITH RECURSIVE04:16
wgrantWhich is not completely helpful04:16
StevenKwgrant: http://pastebin.ubuntu.com/1561633/04:18
wgrantStevenK: and what's broken about it?04:19
wgrantOther than some possibly missing parens04:19
StevenKIt was broken, I fixed it by reordering the FROM04:20
wgrantOh04:20
wgrantI thought it was still broken :)04:20
StevenKBut I can't use %s04:20
StevenKIs this a subtle hint that I should Storm-ify it?04:21
wgrantYou should be able to use SQL()04:21
wgrantI don't think our current Storm With expression supports RECURSIVE04:22
StevenKwgrant: The callsites do SQL(), the functions are expected to just return a string04:24
wgrantYou might want to rearrange that04:24
wgrantGiven the paucity of callsites that should be quite trivial04:25
StevenKwgrant: http://pastebin.ubuntu.com/1561643/04:28
wgrantStevenK: https://code.launchpad.net/~wgrant/launchpad/bug-1100977/+merge/14443204:29
StevenK22if content.find(no_key_message) >= 0:04:30
StevenKSadface04:30
wgrantStevenK: I think your linewrapping violates the UDHR.04:30
StevenKWhich linewrapping?04:31
wgrant+        )""", params=(spec.id, convert_storm_clause_to_string(04:31
wgrant+            *get_specification_privacy_filter(user))))04:31
StevenKwgrant: And you didn't complain that I only fixed one of the methods? Disgraceful.04:33
StevenKwgrant: http://pastebin.ubuntu.com/1561650/04:33
wgrantI give up reading un-highlighted diffs easily :)04:33
wgrant(--syntax=diff is your friend)04:33
wgrantThat's still a criminal offence in most jurisdictions, but less so04:34
StevenKwgrant: params=(\nspec.id, ... )?04:35
wgrantStevenK: Right :)04:36
StevenKwgrant: http://pastebin.ubuntu.com/1561657/04:37
wgrantStevenK: Actually, I'm surprised that works. 04:40
wgrantGiven you're passing a plain string into params04:40
wgrantBut trying to use it as SQL04:40
wgrantIt may work if you wrap it in SQL(), not sure04:40
StevenKI've not actually tried it ...04:41
wgrantHeh04:41
wgrantYou might actually be able to properly Stormify it with a bit of a hack04:42
wgrantWith('RECURSIVE dependencies(id)', Union(...))04:42
StevenKDataError: invalid input syntax for type boolean: "Specification.information_type IN (1, 2)"04:43
StevenKLINE 8:             WHERE sd.specification = d.id AND (E'Specificati...04:43
StevenKHahaha04:43
StevenKHmmm04:46
StevenKProgrammingError: can't adapt type 'In'04:46
StevenKwgrant: I'm not sure about the Storm-ified version ...05:20
StevenKOr indeed if I've done it correctly05:20
StevenKwgrant: http://pastebin.ubuntu.com/1561722/05:25
wgrantStevenK: The easiest way to be sure about it and that you've done it correctly is to see if the tests work05:26
wgrantBah05:28
wgrantzeca was tested directly05:28
StevenKHaha05:28
StevenKI was about to point that out05:28
StevenKCompileError: Don't know how to compile type Reference of <storm.references.Reference object at 0x795c850>05:29
StevenKThanks for being helpful, Storm.05:29
wgrantStevenK: Did you do reference == reference?05:29
wgrantThat doesn't work05:29
wgrantid == id05:29
wgrantOr reference == id05:30
wgrantworks05:30
StevenKSpecification.id == SpecificationDependency.specificationID05:32
StevenKThat's the only ==, so I'm not sure which reference it's barfing on05:32
wgrantIs it roughly simialr to the code that you pased?05:33
wgrant+        'RECURSIVE blocked(id)', Union(Select(05:33
wgrant+            (SpecificationDependency.specification,),05:33
wgrantThat might not work05:33
wgrantYou probably have to select the ID05:33
StevenKwgrant: The only change is calling the new function further down05:34
StevenKwgrant: 'RECURSIVE blocked', Select((id,), Union(... ?05:35
wgrantStevenK: That'll try to select the builtin function 'id'05:37
wgrantSpecificationDependency.specificationID05:37
StevenKWhich is already in the inner select?05:38
wgrantStevenK: Is that a problem?05:39
StevenKJust ... odd05:40
wgrantNot sure how05:41
StevenKRight, RECURSIVE blocked(id) is working because specificationID rather specification05:45
StevenKExcept it doesn't love blocked05:45
StevenKSo I get an actual statement that compiles but postgres doesn't love.05:45
wgrantWhat does postgres complain about?05:46
StevenKwgrant: http://pastebin.ubuntu.com/1561762/05:48
wgrantStevenK: Ah, you should be able to see the problem there05:49
StevenKSelect((spec.id,), Union(... ?05:50
wgrantNo05:50
wgrantLook at the first line05:50
StevenKOh, quoting RECURSIVE is a bad thing05:50
wgrantYes05:50
wgrantWith(SQL("RECURSIVE blocked(id)"), ...) might work05:50
wgrantNot sure05:50
StevenKProgrammingError: syntax error at or near "("05:52
StevenKLINE 1: WITH (RECURSIVE blocked(id)) AS (SELECT 13 WHERE (SELECT Spe...05:52
StevenKLet's go with no05:52
wgrantStevenK: Bah, it's too smart.05:55
StevenKHeh05:55
wgrantStevenK: Define your own With expression, I guess.05:55
StevenKI don't think the Storm-ifying is buying us anything. If anything, it's far uglier05:55
wgrant(or extend the one in our Storm branch, I guess, would be better005:55
wgrantCertainly05:56
wgrantBut it would have been a trivial way to integrate the privacy filter apart from the RECURSIVE issue05:56
StevenKToss it as a param is giving me a wierd error too05:56
wgrantWell, params is for params05:56
StevenKOh05:57
StevenKI feel %s calling, but I'll get stabbed05:57
wgrantIt seems that avoiding it here is somewhat non-trivial05:58
wgrantSo it may be permissible05:58
wgrantBut inserting the id like that as the original code did is strictly forbidden05:58
wgrantEven in legacy code05:58
adeuringgood morning08:52
=== almaisan-away is now known as al-maisan
jtvGood morning adeuring!09:00
adeuringhi jtv!09:00
=== yofel_ is now known as yofel
plommehi guys10:49
=== jtv1 is now known as jtv
=== Ursinha_ is now known as Ursinha
cjwatsonwgrant: I'd like to have a pre-imp chat about bug 110287014:12
_mup_Bug #1102870: Copies use naïve ancestry check to calculate previous version for notifications and bug closures <package-copies> <Launchpad itself:Triaged> < https://launchpad.net/bugs/1102870 >14:12
cjwatsonI *think* a sensible way to approach this is by moving NascentUpload.getSourceAncestry (and probably getBinaryAncestry too, for symmetry) somewhere more sensible14:13
cjwatsonHowever, it uses the deprecated DS.getPublishedSources method14:13
cjwatsonRephrasing it in terms of Archive.getPublishedSources isn't too hard, but it means more potato programming since there's then no way to query multiple archives at once14:14
cjwatsonI kind of feel that the method belongs on DS anyway, since it's "give me the current published version of $package in this distroseries, for some set of pockets"14:15
cjwatsonBut I'm not sure that there isn't a better place - do you have any strong feelings?14:16
cjwatson(If I put it on Archive, then I have to do explicit version comparison between the results for each pocket, I think, and the method that does that will still have to live somewhere common - so I don't think putting it on Archive would help)14:17
cjwatsonIt might be worth getting rid of one more use of DS.getPublishedSources in any case; something like http://paste.ubuntu.com/1563165/14:19
=== al-maisan is now known as almaisan-away
=== slank_away is now known as slank
=== matsubara is now known as matsubara-lunch
gmbbenji, bac, if either of you have time today, could you take a look at https://code.launchpad.net/~gmb/lp2kanban/encode-annotations-with-json/+merge/144372? It takes the description annotations work and uses JSON for encoding rather than hand-rolled key=value pairs.15:56
gmb(per benji's suggestion)15:56
benjigmb: sure (bac is a bit sickly at the moment)15:56
gmbbenji, Thanks.15:57
=== matsubara-lunch is now known as matsubara
=== matsubara is now known as matsubara-afk
joeydzin: hmm sinzui isn't here19:54
joeydzin: maybe we need to go to #launchpad! :-)19:54
dzinok :)19:54
czajkowskijoey: he doesnt do LP stuff any more19:55
joeyczajkowski: ah ha19:55
cjwatsonwgrant,StevenK: I'd like to get https://code.launchpad.net/~cjwatson/launchpad/avoid-copy-archive-spam/+merge/144611 reviewed reasonably quickly, to ensure we stop spamming its victim23:59

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