/srv/irclogs.ubuntu.com/2010/06/23/#launchpad-dev.txt

=== EdwinGrubbs is now known as Edwin-zzzz
=== lifeless_ is now known as lifeless
=== almaisan-away is now known as al-maisan
pooliestub, lifeless, is there any facility in launchpad at the moment for configuration that can be changed by sysadmins?08:11
pooliein particular if i want a list of trusted dkim domains08:11
poolieor a switch to turn dkim on/off08:11
lifelessyes08:11
lifelessthe config files08:11
poolieok08:11
lifelessthey have settings for dev, staging, edge, production08:11
lifelesshm08:39
lifelessoops08:39
james_wanyone around who knows the job system and can provide some advice?08:53
james_wI would like to know the preferred way to implement a new job08:54
james_wWhether a fairly generic job with json, implying serialising some things to strings to lookup as keys when the job is run, or a more-specific job type that can have References to the other models, saving that serialisation step, would be preferred.08:54
pooliehi james_w08:55
poolieunfortunately i don't know about that08:55
james_whi poolie08:56
mrevellMorning09:21
james_wBjornT: hi, do you have an opinion on whether a new job type should use as many References as possible, or serialise to JSON and look up the objects again based on keys in the JSON?09:25
lifelessjames_w: hi09:28
lifelessjames_w: I'm not sure there is a general answer to that question09:28
james_whi lifeless09:28
lifelessjames_w: I'd consider things like:09:28
lifeless - are there security implications on any referenced tables09:29
james_wI'm happy to give specifics09:29
lifeless - are there performance implications ...09:29
lifeless - what would be simplest for your code09:29
lifeless - are there race conditions - do you need to freeze parameters so they don't change under you09:29
lifelessjames_w: sure, though I'm signing off - 4am rise tomorrow - shortly09:30
lifelessjames_w: oh and obviously the inverse of the previous one, do you have parameters that *have* to be fresh09:30
james_wg'night09:32
thumperjames_w: hi10:01
thumperjames_w: what are you looking to do?10:01
james_whi thumper10:01
james_wI want to create a job type for the creation of copy archives10:02
james_wthese have a source archive, target archive, source distroseries, source packagesets, source component, etc.10:02
thumperjames_w: what we did for BranchJob was to just have the branch that it was linked to, and everything else in a json blob10:02
thumperthe general idea is:10:03
james_wan ArchiveJob to parallel BugJub and BranchJob would be useful elsewhere, but there is far more linked data here than in any of the other jobs10:03
thumperif you need to query against the value, it needs to be a column10:03
thumperotherwise a blob is fine10:03
thumperjames_w: the question relates to what you end up querying against10:03
thumperand what the job really links to10:03
thumperand how it needs to be selected...10:04
thumperwhat invalidates the job...10:04
thumperhow it will be deleted...10:04
james_wjust target archive needs to be queried against I think10:04
thumperwhat other jobs will there be for archives?10:05
james_wdon't know yet10:05
james_wthere are a bunch of things that could be possible to have there, bulk copying packages, even publication10:06
thumperbut it is likely that there will be more?10:06
thumperI'd suggest make a mirror of the branch job table for now10:06
thumperalthough I hate myself for saying it...10:06
thumperthe duplication rubs me the wrong way10:07
thumperbut is the best we have for now10:07
thumperbut instead of a branch reference, have the archive10:07
james_wthere's a hell of a lot of boilerplate to create a new job type10:07
thumperI wouldn't say there is that much...10:07
thumpera lot has been moved into base classes10:07
thumperbut yes,10:07
thumperthere will be duplication and boilerplate10:07
james_whttps://dev.launchpad.net/Foundations/JobSystem10:08
* thumper isn't working :) just helping10:08
thumperI'm in Perth having a holiday10:08
james_wwell, thanks :-)10:08
thumperbut as you can see, I have my laptop :)10:09
thumpercan't go on holiday without it, well, not for more than a few days10:10
thumperI need my fix10:10
deryckMorning, all.11:01
maxbIn relation to the just-gone discussion in #launchpad, maybe we should have uses_soyuz and uses_lp_distromirrors attributes on distributions?11:21
wgrantmaxb: We already have IDistribution.full_functionality11:39
wgrantCurrently a celebrity-based hack, but it works.11:39
jmlmaxb, or even IDistribution.build_system :)11:41
bigjoolsICanHazBuilds11:42
wgrantBut even just hiding series that don't have any PPA-capable DASes would be a good start.11:42
bigjoolswgrant: BTW did you notice that we got the first successful recipe build done in prod yesterday?11:44
wgrantbigjools: I saw some bugs fly past that suggested it.11:45
wgrantIs this after chmoding the source dir on cesium?11:45
bigjoolsno, fixing the init script for the b-m11:45
wgrantAh.11:45
bigjoolswhich had an interesting "cd" in it11:45
bigjoolsso, part of this success is down to you, thanks a lot man :)11:45
wgrantI'm glad it's finally running.11:46
wgrantA few months later than I expected, but.....11:46
wgrantmrevell: The PPA terms of use state that anything OK for Ubuntu is OK.11:57
wgrantAnd just about anything redistributable is OK for Ubuntu.11:58
mrevellwgrant, Thanks for that. I'm not saying you're wrong but that's not how we've enforced it before. For example, we nearly closed a PPA a year or two back that had the flash installer in it but the owner reworked it.12:00
wgrantRight, it seems like it's wrong, but it seems to be what the terms of use say.12:00
wgrantHmm.12:01
wgrantbigjools: The bzr-builder PPA doesn't also have a modern bzr in it?12:02
bigjoolsis that a question or a statement?12:02
wgrantI just tried a Hardy build, and it seems to be using real Hardy bzr.12:02
wgrantI didn't even know bzr-builder would work with something so old.12:02
bigjoolsthe production system doesn't use a PPA for the bzr-builder dep12:03
wgrantOh, bzr-builder is in -updates?12:03
bigjoolsno, there's an internal archive12:03
wgrantAh, right.12:03
mrevellwgrant, Thanks for raising that. As ever, you're the guy who keeps me on the right track :) I'll review the terms and how we enforce them.12:03
wgrants/bzr-builder PPA/internal archive/12:03
bigjoolsheh - no idea12:04
bigjoolsI'll let abentley chase that one up12:04
james_wwgrant: bzr-builder doesn't do anything particularly interesting with bzrlib, just equivalents of branch and merge, which have been around for ever.12:05
wgrantAh.12:06
wgrantjames_w: http://launchpadlibrarian.net/50794525/buildlog.txt.gz <- do I need to backport python-debian too?12:16
james_wwgrant: quite possibly12:16
james_wwe could perhaps fix it in bzr-builder12:17
wgrantIs the PPA publisher working? I copied a package about 12 minutes ago -- it's still Pending.12:31
wgrantAh, there.12:32
wgrantLooks like it missed two runs.12:32
=== matsubara-afk is now known as matsubara
=== mrevell is now known as mrevell-lunch
=== salgado-afk is now known as salgado
=== mrevell-lunch is now known as mrevell
james_whow do I get the key for a enum item?14:04
james_wI want to store something that I can use to get that enum value back14:04
james_w.value?14:05
=== Edwin-zzzz is now known as EdwinGrubbs
jmljames_w, have you figured it out yet?15:52
james_wno15:52
james_wyes15:52
jmljames_w, cool. :)15:53
jmlsorry for not trying to answer earlier.15:53
james_wPackagePublishingPocket.items[PackagePublishingPocket.RELEASE.value] I think15:53
james_wjust waiting for my tests to confirm15:54
james_wyes15:54
=== salgado is now known as salgado-lunch
james_wwhich layer should I use for a test class that will just be using the db (and possibly librarian), but doesn't care about the web ui and stuff?16:23
james_wis LaunchpadZopelessLayer just for script tests?16:23
=== matsubara is now known as matsubara-lunch
james_wbigjools: do you have a problem with PackageCloner creating build records for the packages it copies too? Currently it just copies sources and the builds are created elsewhere. I would like to consolidate for ease of testing.17:07
bigjoolsjames_w: remind me where they're created at the moment?17:08
james_wscripts/populate_archive.py17:08
bigjoolsurgh17:08
bigjoolsyeah change it17:08
=== beuno is now known as beuno-lunch
=== salgado-lunch is now known as salgado
=== beuno-lunch is now known as beuno
=== matsubara-lunch is now known as matsubara
=== al-maisan is now known as almaisan-away
jmlI'm getting an error trying to build gettextpo18:22
jmlit's the first time I've tried to build lp in a few months, so I might have missed some obvious / crucial step18:22
jmlhttp://paste.ubuntu.com/454033/18:22
jmlhelp?18:26
dobeyanyone know why the merge proposal diffs aren't updating in launchpad, and it's not sending the mails for proposal status changes?18:30
jmldobey, no, I don't, but I saw abentley say something vaguely operational about it on another channel18:32
abentleydobey, no, at this point it's just under investigation.18:33
james_wjml: that's odd, if pydoc was failing it would normally say "Error" before "Leaving directory" I think18:33
dobeyabentley: ok, thanks18:34
james_wthat's probably the last step either way, so that doesn't tell you whether it failed18:34
james_wif you are using parallel make then the actual error can be further back18:35
jmljames_w, how would I know if I'm using parallel make?18:35
james_wI don't know, apart from it doing more than one thing at once18:36
james_wif there's no error before it starts printing pygettextpo stuff then you probably aren't18:36
james_wI don't think it's default for LP, so unless you ran "make -j"...18:36
jmlhm.18:37
jmloh, I missed a tb18:37
jmlhttp://paste.ubuntu.com/454037/18:37
jmloh huh18:44
jmlI think I have a local copy of Python18:44
jmlIf I want to add some tests for bugtask, should I add them to test_bugtask.py, test_bugtask_0.py or test_bugtask_1.py?+18:51
james_wheh18:54
james_wprobably make test_bugtask_jml.py?18:55
jmljames_w, maybe I should use the database id for my row in Launchpad to avoid confusion18:55
jmlderyck, If I want to add some tests for bugtask, should I add them to test_bugtask.py, test_bugtask_0.py or test_bugtask_1.py?18:56
deryckjml, I don't know.  Let me look more after the call.19:01
jmlderyck, thanks.19:01
james_wgah, IPackagesetSet has a get method that works different to all the other get methods I have come across19:11
jmlyeah. we need some consistency.19:11
james_ware there any scripts in LP that would be run by an admin and just create a job for later processing? Would we want such a script to create the job but synchronously process it? Or just do the work and leave the job for webservice requests?19:18
jmljames_w, I'm not sure what you mean.19:24
james_wpopulate_archive.py currently creates a copy archive and sits there while everything is copied19:24
james_wI'm working on making copy archive creation a job such that we can do it over the API and the like if we wish19:25
james_wI'm wondering if I should:19:25
james_wa) have the populate_archive.py script create the job and exit, leaving it up to a cronscript to do the work and the person running the script to poll the web ui to find when it is done19:25
james_wb) have the populate_archive.py create the job, but pre-claimed, and then kick off the running of the job synchronously such that it can report the results to the admin running the script19:26
james_wc) have populate_archive.py ignore the job system and just run the code in pretty much the way it is now, and just have the job system as an alternative entry point19:27
james_wd) other19:27
james_we) none of the above19:27
james_w3) Uzbekistan in the 1920s19:27
jmljames_w, sorry for the delay, I'm on a call that got interesting :)19:33
james_wnp19:34
james_wit's an idle question as I hack the code to actually make any of this possible19:34
jmljames_w, I don't know enough about what populate_archive.py does, I think. a) seems the most consistent19:35
jmland we should have a widget on the ui for tracking in-progress jobs19:35
james_wso populate_archive.py creates something like launchpad.net/~jml/+copy-archive/some-new-archive19:36
james_wthen it spends a few minutes copying all the sources from Ubuntu in to it and creating build records so that you can testbuild a snapshot of Ubuntu19:36
james_wthis is currently something that is usually done by an admin for doko19:37
james_wso I guess it's a question for the losas? they are the only ones that will use the populate_archive.py interface.19:37
jmljames_w, yeah, maybe.19:38
jmljames_w, now that you explain it though, I'm more inclined toward a)19:38
james_wPerhaps it will be changed to do an API call instead, in which case we can't really do synchronous, as we don't even have a way to poll for completion of this job19:38
jmljames_w, although it's something of a regression in the UI of the script, we should just fix the webservice api so that the script can behave the way it did.19:39
jmljames_w, after all, this isn't the only case where someone wants to run scripts that kick off long-running jobs.19:39
james_wyeah19:39
jmlderyck, thanks for looking at the test_bugtask thing btw19:40
james_wjml: do you have any notes from your earlier call with Julian?19:40
deryckjml, yes, just back from coffee.  Looking now....19:41
abentleydobey, the script got stuck and we've restarted it.  Please let us know if you're still experiencing problems.19:43
dobeyabentley: ok thanks19:43
* dobey waits for a flood of e-mail19:43
abentleyjames_w, we do already have scripts that create jobs and let a cronjob handle running them.  e.g. the branch scanner.  Daily builds is similar, though it hands off to the build farm, not a cron script.19:51
deryckjml, so I think just use test_bugtask.19:52
deryckjml, the others seem like someone was thinking something that is not now clear :-)19:52
jmlderyck, that had occurred to me :)19:52
jmlderyck, thanks.19:52
james_wabentley: they are scripts run by admins?19:52
abentleyjames_w, they are normally run from cron scripts themselves.19:53
abentleyOr as cron jobs, I should say.19:53
james_wabentley: right, this will only ever be run by hand on request19:53
* deryck will make a note to confer and refactor test_bugtask* as appropriate19:53
jml5 seconds to start the functional layer20:06
jmlgary_poster, do you know by what mechanism the API documentation lists the possible choices for "hardware_bus" on https://edge.launchpad.net/+apidoc/devel.html#bug_target for searchTasks?21:12
gary_posterjml: no, but my guess would be by introspecting a vocabulary specified in an interface.  I could probably find out quickly.  Should I?21:14
jmlgary_poster, yes please. I'm trying to figure out how it knows to introspect as well.21:14
gary_posterk21:15
gary_posterjml: it almost certainly introspects the Choice field on line 95 of lp/bugs/interfaces/bugtarget.py .  This in turn points to a vocabulary, which is apparently, per the comment, set to HWBus in ./canonical/launchpad/interfaces/_schema_circular_imports.py:16521:25
=== ubuntujenkins_ is now known as ubuntujenkins
james_wlazr.restful.marshallers.SimpleVocabularyLookupFieldMarshaller knows how to iterate items on an enum to get the valid choices21:27
jmldoes that get used to generate the wadl21:28
gary_posteryes21:28
jmlok. thank you gary_poster & james_w21:31
gary_posternp21:31
jmlactually, it looks like it's used to make the json, not the wadl21:42
james_wjml: http://paste.ubuntu.com/454134/21:49
jmljames_w, thanks.21:49
james_wjml: in return any hints you could give me of how I would get a SourcePackagePublishingHistory given it's id would be greatly appreciated21:58
james_wthere's no ISourcePackagePublishingHistorySet I can see21:58
james_whmm, there's an IPublishingSet21:58
jmljames_w, you can cheat & use storm. getUtility(ISomethingOrOther).find(SourcePackagePublishingHistory, SPPH.id=your_id).21:59
james_wjml: thanks, I'll resort to that if this doesn't work22:00
=== matsubara is now known as matsubara-afk
james_wgetUtility(IPublishingSet).getByIdAndArchive() apparently. Though for some reason that returns you a ResultSet and you have to call .one() on it yourself.22:06
jml:(22:06
jmljames_w, there's only one callsite for that, and no unit tests.22:08
jml(or doctests)22:08
james_wjml: are you suggesting I fix it up?22:09
=== salgado is now known as salgado-afk
jmljames_w, I am. But I can completely understand if you'd rather not.22:09
james_wI'm already in the middle of a monster branch22:10
james_wso adding one more thing to it isn't going to hurt that much22:10
james_whmm, my ec2 instances seem to be dying without mailing me22:11
jmljames_w, good news and bad, even while I momentarily gaze away22:11
jmlgary_poster, james_w, fwiw, I was working on https://bugs.edge.launchpad.net/lazr.restful/+bug/590561. Now I've stopped.22:12
_mup_Bug #590561: searchTasks API documentation doesn't document acceptable status arguments <lazr.restful:New> <Launchpad Bugs:Triaged> <https://launchpad.net/bugs/590561>22:12
gary_posteron call22:12
jmlnp. it's not urgent.22:12
james_wmore fun: http://paste.ubuntu.com/454140/22:12
james_woh, that one's my mistake22:12
jmljames_w, nyah-ah-ah22:13
jmljames_w, if they are dying without mailing, I'd recommend running them attached.22:13
jmljames_w, there's no other way of guaranteeing you'll get output.22:14
james_wjml: just kicking that off now22:15
jmljames_w, cool.22:16
jmljames_w, I'm off now to find something to eat.22:17
james_wjml: enjoy22:18
jmljames_w, and thence to not work.22:18
jmljames_w, enjoy your evening22:18

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