/srv/irclogs.ubuntu.com/2012/10/26/#launchpad-dev.txt

cjwatsonwgrant: bzr mv lazr.jobrunner-0.11.tar.gz dist/00:08
wgrantcjwatson: blargh, oops00:09
wgrantcjwatson: Fixed, sorry00:09
cjwatsonnp00:10
cjwatsonHuh.  I set lp.distributions["ubuntu"].redirect_release_uploads to True, and yet https://launchpad.net/ubuntu/raring/queue?queue_state=1 shows anna having gone to the Release pocket :-(00:41
* cjwatson wonders what he got wrong00:41
cjwatsonI don't suppose poppy uses a different tree?00:42
cjwatsonWell, except this is process-upload, not poppy as such00:43
cjwatsonUnless I was in slightly too much of a rush and beat the rollout to pepo ...00:44
cjwatsonThat was it.  Phew.00:45
wgrantYeah, appservers are done early on00:46
wgrantpepo not so much00:46
spmcjwatson: I can probably fill you in on a secret. we webops watch for activity from certain users - you're one of the lucky ones - and deliberately break things when you're on, just for our twisted amusement.00:47
nigelblol00:47
spmSome of the devs have gotten in on this, and do similar, but release NDTs at those times.00:47
nigelbHeh, wgrant "I'm sorry for your loss"00:48
spmcjwatson: http://www.xfos.com.au/tears.jpg so yeah, drink up mon!00:48
cjwatsonspm: I already assume computers are malevolent; operators being malevolent is just a logical extension00:49
spmc00:49
nigelbclearly spm's *s* expands to Simon, of BOFH.00:49
spmthe p is derived from Rick.00:49
spmapplied to, perhaps00:50
wgrantHm02:04
wgrantSomething increased the registry 99% render time from about 1.7s to 2.4s between the 19th and the 21st02:05
wgrantAnd it remains high02:05
wgrantThat coincides well with a large number of private projects query changes02:06
wallyworld_wgrant: if you have a spare moment today, could you take a look at my preliminary experimentation with setting the correct binary package components? the extra joins in the binary overrides query are needed to get the associated source package release to get the spr component, but performance may be an issue. is what i've done on the right track?02:29
wallyworld_https://code.launchpad.net/~wallyworld/launchpad/package-defaults-192076/+merge/13150902:29
wgrantwallyworld_: Hm, doing it in the override queries is an interesting approach02:32
* wallyworld_ has no idea about soyuz02:33
wallyworld_i just tried to gather the info that was needed02:33
wallyworld_maybe i can do another query later in the workflow02:34
wallyworld_i'm also unsure how to do the distro validity check02:34
wgrantwallyworld_: So, the main place this is a problem is in NascentUpload.processUnknownFile02:38
* wallyworld_ looks at that method02:38
wgrantIt's a bit sad that you've chosen possibly the worst bit of Soyuz to work on02:40
wallyworld_i have no idea what's good and what's bad02:40
wgrantThe override stuff is particularly hideous, as it follows a design which I intended to be followed up by a major refactoring cleanup pass02:40
wallyworld_the calculateSourceOverrides() method seems to implement the rules in bug 120052, so i was doing a similar approach for binary packages02:42
_mup_Bug #120052: Component mapping for new source packages <lp-soyuz> <Launchpad itself:Fix Released by julian-edwards> < https://launchpad.net/bugs/120052 >02:42
wallyworld_or so it seems to me anyway02:43
wgrantwallyworld_: Right, but you'll see that NascentUpload uses UnknownOverridePolicy.getComponentOverride directly02:43
wallyworld_does NascentUpload process binary packages?02:44
wallyworld_since that's what the bug is referring to02:44
wgrantYes.02:44
wgrantIt processes both source and binary uploads02:44
wallyworld_hmmm. ok. so binary packages are processed there and also in the code i've touched02:44
wgrantThe code you've touched is mostly for copies02:45
wallyworld_copyBinariesTo()02:45
wgrantWhich are somewhat interesting, but post-date the bug by some years02:46
wgrantThey're not the common case, even today02:46
wallyworld_so, if NascentUpload is changed, the copy stuff should be changed too i guess02:46
wallyworld_to be consistent02:46
wgrantSort of02:46
wgrantThe copy overrides stuff is pretty awful02:47
wgrantI don't quite remember how that side of things works with respect to the queue02:47
wallyworld_so, i assume that NascentUpload has enough info to find the spr associated with a binary, then i can go from there02:47
wgrantRight, when uploading a binary we always have a target build, which has a related SPR02:48
wallyworld_how do i check if a component is valid for a distroseries?02:49
wgrantThat's recorded in the ComponentSelection table02:50
wgrantHowever02:50
wgranthowever...02:50
wgrantAre you using SPR.component?02:50
wgrantI haven't read the MP in detail02:50
wallyworld_yes02:50
wgrantThat's incorrect, sadly.02:50
wgrantYou need to find SPPH.component, for some relevant SPPH02:50
wgrantWhich is probably BinaryPackageBuild.current_source_publication02:51
wallyworld_my brain hurts02:51
wgrantSPR.component is set only once, when the SPR is created in the DB for the first time02:51
wallyworld_ok, i haven't seen any data, i was just guessing based on attribute names02:51
wgrantFor lots of Ubuntu packages, they're first imported from Debian02:51
wgrantSo they appear first in main in the Debian primary archive, so SPR.component == main02:52
wgrantThen they're copied into Ubuntu, where the SPPH.component is overridden to universe02:52
wgrantThe binaries should default not to main, but to universe02:52
wgrantEven though SPR.component still == main02:52
wallyworld_ok. could i perhaps just add an override mapping from main->universe?02:53
wgrantYou may now be getting the rationale behind my campaign to unify uploads and copies02:53
wgrantNope02:53
wgrantIt won't always be universe in Ubuntu02:53
wgrantIt could be main02:53
wgrantor restricted02:53
wgrantor multiverse02:53
wallyworld_sure, but i mean just for the default mapping02:54
wgrantSo, the general rule is that if a new binary has no existing ancestral component, it should inherit the component of its build's current SPPH02:54
wallyworld_ok, so i look in ComponentSelection with spph.component to see if it is valid for the distroseries02:56
wallyworld_if valid, use that, if not valid, what do i do then?02:56
wallyworld_just use universe?02:56
wgrantWell02:58
wgrantI'd just always use SPPH.component, probably02:58
wgrantThe SPPH is in the relevant distroseries02:58
wgrantIf it's not, crashing is OK02:58
wallyworld_ok, and if there isn't one?02:58
wallyworld_raise an exception02:58
wgrantThat's a more interesting question02:59
wgrantWe already have an issue today with builds where there is no current source publication02:59
wgrantUsually because the source was supereseded/deleted before the build finished02:59
wgranteg. http://launchpadlibrarian.net/120668537/aYDS2Qq6K4jADFvNDYo0RyGBld1.txt03:00
wgrantAnd I think there's a bug for that03:00
wallyworld_ok, that can be for some other branch to fix i guess03:00
wallyworld_so above you said "sort of" when i asked about ensuring both places were consistent - copy and upload03:00
wallyworld_if i change upload, then copy has to change too i would think03:00
wgrantSo, I'd use SPPH.component, assume it's valid, use the current default mechanism if it's not set03:00
wgrantYou need to preserve the current default mechanism for sources, anyway03:01
wgrant(processUnknownFile is used for both sources and binaries)03:01
wallyworld_yes, i wasn't going to touch sources03:01
wgrantI have to hope that StevenK remembers how missing copy overrides work03:02
wallyworld_i guess target_build = None for sources?03:02
wgrantIt's relatively modern and I have repressed that memory03:02
wgrantUm03:02
wgrantThat's one way03:02
wgrantYou'll need to redesign the way processUnknownFile is called03:03
wallyworld_missing copy overrides seems to use the archive component or defaults to "universe"03:03
wgrantSo it can be given some context03:03
wallyworld_ok, i haven't looked at the code fully yet03:03
wallyworld_so, is using the archive component correct then for mising copies?03:03
wgrantOh, as in archive.default_component?03:04
wallyworld_yes03:04
wgrantIf it's set, sure03:04
wgrantIt overrides the traditional default logic03:04
wallyworld_the code defaults to universe if it is not set03:04
wgrantBut only for partner/PPA03:05
wgrantWell03:05
wgrantIIRC it defaults to universe unless [SB]PR.component is contrib or non-free, in which case it defaults to multiverse03:05
wgrantRight?03:05
wallyworld_that's force sources i think03:05
wallyworld_for03:05
wallyworld_not binaries03:05
wgrantToday it's meant to go: ancestry.component, archive.default_component, [SB]PR.component -> universe/multiverse03:06
wgrantThe bugfix will be: ancestry.component, (if binary) build.current_source_publication.component, archive.default_component, [SB]PR.component -> universe/multiverse03:07
wgrantI think03:07
wallyworld_i think it looks in spph first, and then uses a default mapping for unknown03:08
wgrantRight, it will always look up the [SB]PPH ancestry first03:08
wallyworld_default mapping is contrib/non-free -> multiverse03:08
wallyworld_everything else -> universe03:09
wgrantRight, that's the last resort03:09
wallyworld_above, build.current_source_publication.component = spph.component, right?03:09
wgrantcurrent_source_publication is an SPPH, right03:10
wallyworld_ok, i'll give it a go. i might delay doing the extra query when copying binaries so that only unknown ones are processed that way03:11
wallyworld_rather than doing the extra joins up front03:11
wgrantYeah, definitely.03:12
wallyworld_i wonder how many copied binaries are unknown03:12
wgrantIt happens most often with kernel SRUs and security updates03:12
wgrantBut it's relatively very rare03:12
wallyworld_ok. thanks for all the help03:12
wgrantThe plan was to rewrite find_and_apply_overrides to basically use lp.soyuz.adapters.overrides for everything, but it never got done03:13
wallyworld_i haven't come across find_and_apply_overrides yet03:13
wallyworld_ah, it's in NascentUpload03:14
wgrantRight03:14
wgrantIt's what calls processUnknownFile03:14
wgrantIt's the original implementation of the override logic03:14
wgrantCopies didn't respect overrides until 18 months ago03:15
wallyworld_so we have 2 implementations, do they do the same thing?03:15
wallyworld_ie give the same result?03:15
wgrantMostly except sort of not03:15
wgrantThe idea was that lp.soyuz.adapters.overrides would be the One True Implementation03:15
wgrantBut the old one was never destroyed, in true LP style :(03:15
wallyworld_so maybe i should at least make upload and copy do the same thing then03:15
wallyworld_and delete the old code03:16
wgrantThat sounds slightly too adventurous03:16
wgrantFor a first adventure into Soyuz03:16
wgrantAlthough it would be a good tour, I guess03:16
wallyworld_isn't it just the find_and_apply_overrides method to be replaced?03:16
wallyworld_with calls to the adaptor03:16
wgrantmostly03:16
wgrantIt's unlikely to be as smooth as we hope03:17
wgrantAs we don't have publications here03:17
wallyworld_is there adequate test coverage?03:17
wgrantNot adequate enough that I'd deploy it without extensive manual QA, but probably enough for development.03:18
wallyworld_ok, i'll have a play around and see what falls out. but if i do it, i'll have to beg for help with qa03:19
wgrantWith the history of this stuff, I would be QAing it personally regardless of who wrote it and had already QAed it, don't worry03:19
wgrantThe archiveuploader tests are some of the most archaic we have03:20
* StevenK can recall that about his overrides policy code03:20
wallyworld_ok, thanks. it may be that i chicken out03:20
wallyworld_but i'd like to get rid of inconsistent, "duplicate" code03:21
wallyworld_where possible03:21
wgrantDefinitely03:21
wgrantThis is an example that really needs it, but it's not the easiest way to start off in Soyuz.03:22
wgrantSo we'll see03:22
wgrantStevenK and I probably know both sides of this code reasonably well03:23
wgrantSo can unstick you as required03:23
wallyworld_ok, thanks03:23
wallyworld_it's hard because i have no domain knowledge and don't know where to find data to help me understand the code :-)03:24
wallyworld_but, we'll see03:24
StevenKwallyworld_: I think your first step is to print out http://behlerblog.files.wordpress.com/2012/06/frustrated-kit.jpg03:24
wallyworld_hah, i did that when i first used zope03:25
StevenKTell me about it, so did I.03:25
StevenK*And* I had to learn Soyuz at the same time03:26
wallyworld_a good debugger is absolutely mandatory03:26
wgrantBut you had Soyuz experience!03:26
StevenKwgrant: Sure, with using it!03:26
nigelblol03:26
StevenKTells me absolutely nothing about how the code hangs together.03:26
nigelbThat reminds me of my first lp patch.03:26
wallyworld_StevenK: so, same with women03:27
nigelbI was using grep to find things and I needed like 5 windows for grepping different things.03:27
wallyworld_nigelb: you need an IDE with code navigation features03:27
wallyworld_much easier03:27
nigelbI'm guessing you use pycharm?03:27
ajmitchnigelb: you obviously were changing a simple part of LP then03:27
wallyworld_yup03:28
nigelbajmitch: Heh, yes.03:28
nigelbI need to get back to LP dev. Been lazy.03:28
wallyworld_s/lazy/smart03:28
nigelb^ I was trying to be diplomatic03:29
wallyworld_i was joking :-)03:29
wallyworld_lp is nice once you get to know and love it03:29
nigelbs/love/not want to kill yourself/g03:29
nigelb*kill yourself because of03:29
wallyworld_it's just like any lrge software system with lots of legacy03:30
nigelbThat's true.03:30
ajmitchwallyworld_: stockholm syndrome is real03:30
nigelbajmitch++03:30
wallyworld_lol03:30
nigelbhahah03:30
wallyworld_sadly i have to pause the fun soyuz stuff to deal with some ec2 hate mail03:36
nigelbajmitch: I'll admit, fixing LP bugs was among the most satisfying bugfixes I've done.03:37
nigelbWhen I did the mouseover for bug titles thing, a lot of people pinged me say they love it ;)03:38
nigelb(granted it took like 3 attempts at landing to actually land)03:38
wallyworld_wgrant: have you seen ec2 failure with "ClosedError: Connection is closed" but the tests pass locally?03:41
wgrantwallyworld_: In what sort of test?03:42
wallyworld_a couple of doc tests03:42
wgrantHm03:42
wallyworld_eg xx-bug-also-affects.txt03:42
wgrantIf they're the only failures and not very relevant to your changes, just lp-land I guess03:42
wgrantHm03:42
wgrantThis is for the +distrotask change?03:43
wallyworld_yes03:43
wallyworld_could be relevant03:43
wallyworld_but i would expect a local failure also03:43
wgrantYeah03:43
wgrantPerhaps ec2 again to be safe03:43
wallyworld_yeah :-(03:43
wgrantWon't be a significant delay, as we are unlikely to deploy again today03:43
wallyworld_well, here's hoping for 2nd time lucky03:43
nigelblifeless: Did you see that sentry has a js logger thing?05:28
nigelbHehe, I was going to setup sentry for python logging when I noticed it :)05:28
lifelessnigelb: yah, did you see the branch for oops that adds that ?06:57
lifelessimbrandon was working on a revised version06:58
nigelblifeless: hah. no.06:58
nigelbawesome.06:58
lifelessnigelb: https://code.launchpad.net/js-oopsd06:58
nigelb\o/07:02
nigelbNice.07:02
deryckStevenK, are you around?07:06
adeuringderyck: https://code.launchpad.net/~adeuring/launchpad/bug-1067736/+merge/13152707:09
deryckadeuring, got it.07:10
rick_h_deryck: https://bugs.launchpad.net/launchpad/+bug/106881707:21
_mup_Bug #1068817: Person.assigned_specs is an attractive nuisance <private-projects> <specifications> <Launchpad itself:In Progress by rharding> < https://launchpad.net/bugs/1068817 >07:21
StevenKderyck: I am now, but not really as it were.07:36
deryckStevenK, right.  I replied on abentley's MP.  We just need to get that landed, and I assumed you were done with it.07:36
StevenKderyck: Link me, sorry?07:37
deryckStevenK, https://code.launchpad.net/~abentley/launchpad/person-assigned-specs-in-progress/+merge/13088807:38
deryckStevenK, last comment from me.07:38
StevenKderyck: Well, obviously :-)07:38
deryckJust trying to be clear :)07:38
StevenKderyck: I am concerned about the NULL thing, since it may leak data or provide results that are not wanted, so then please do land that branch, but also please investigate to make sure that the NULL doesn't sneak in for the actual code.07:40
deryckStevenK, there is no NULL in the code.  that was a manual substitution we did to test the query.07:41
deryckStevenK, the actuall code-generated query uses two values from the enum.07:41
StevenKderyck: Ah. What I do to test SQL like that is to run a single test with LP_DEBUG_SQL=1 to grab the actual SQL, change the id's for say person or what not and then run it07:43
abentleyStevenK: We were trying to be clever, and failing.07:43
deryckStevenK, cool, thanks for the tip.07:43
deryckStevenK, so we're cool then?07:44
StevenKderyck: Yes. I'm happy to approve it and you guys can land it if you wish?07:45
deryckStevenK, thanks!07:45
StevenKderyck, abentley: Done.07:46
=== almaisan-away is now known as al-maisan
abentleyrick_h_: Could you please review this? https://code.launchpad.net/~abentley/launchpad/milestone-spec-privacy/+merge/13156009:32
=== al-maisan is now known as almaisan-away
=== yofel_ is now known as yofel
adeuringderyck: https://code.launchpad.net/~adeuring/launchpad/filter-private-product-RosettaApplication/+merge/13161313:17
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
=== matsubara is now known as matsubara-lunch
=== matsubara-lunch is now known as matsubara
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha

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