/srv/irclogs.ubuntu.com/2014/11/15/#launchpad.txt

tewardis there syntax in the email interface for bugs to apply one comment to multiple bugs, simulatneously?  I.E. when I email edit@bugs.launchpad, I end up providing bug, affects, and status, so that it knows which status to set for which release in Ubuntu for that given source package and bug... but I don't know how to add one comment to all the bugs... is that even possibel?01:53
wgrantteward: No, but there's a trick: you can also send a comment that includes commands to NUMBER@bugs.launchpad.net, and Cc it to lots of bugs. But why not use the API for this?01:55
wgrantThe Ccing to tonnes of bugs strategy was common in like 2007, but we have launchpadlib now.01:55
tewardwgrant: is there a nice way to do that via the api, or do I need to ultimately code it?01:59
wgrantteward: "ultimately code it" being like 4 lines of code.01:59
wgrantIf you want to close all Karmic bugs, it's extremely complicated.01:59
wgrantfor task in lp.distributions['ubuntu'].getSeries(name_or_version='karmic'):02:00
wgrant    task.status = 'Invalid'02:00
wgrant    task.lp_save()02:00
wgrant    task.bug.newMessage(content="Karmic is EOL", subject="Karmic is EOL")02:01
wgrantEr02:01
tewardwgrant: geez, that's not hard... oh wait, is that Python?02:01
wgrantFirst line should also have a .searchTasks() at the end.02:01
wgrantIt is Python, yes.02:01
wgrantYou can run that directly in lp-shell (though do try API things against staging or qastaging first :))02:01
dobeyyeah, don't fubar it and change every open bug in lp to invalid. :)02:03
tewardi was planning on beating staging actually...02:04
tewardi don't give staging enough pain and punishment :P02:04
tewardwgrant: and here's where the coding gets trickier - i want to only close New, Incomplete, or Confirmed bugs against Karmic...02:05
wgrantteward: searchTasks(status=['New', 'Incomplete', 'Confirmed']) should work.02:05
* dobey highly recommends https://launchpad.net/+apidoc/1.0.html02:06
tewarddobey: it helps when these things are given initially, yes.  :)02:06
tewarddobey: i should read through it... although nice tidbit: I"m not a python guy by nature.  so if none of you mind me beating staging a couple thousand times i'll be testing against that02:08
wgrantWell, staging's down atm for a DB refresh, but qastaging's up.02:09
tewardwgrant: i wasn't planning on running anything until tomorrow - i have three VMs, two servers, a switch, and my firewall's firmware to update this evening02:10
tewardwgrant: but if i do decide to work on that today, with login_with(), does it understand `qastaging` as well as `staging` and `production`02:10
wgrantIt does.02:10
tewardwgrant: and there's no risk of actually affecting real data by targeting qastaging or staging with the testing of this?  (Just making sure before I ever run this :P)02:11
wgrantNo, they're separate servers and databases, firewalled from production.02:12
tewardwgrant: okay, that's good.  i'm going to run this against qastaging on a very small subset of the karmic bugs then - there's only 6 incomplete bugs :P02:25
tewardhopefully it only hits these 602:25
tewardwgrant: via the api, changes are instantaneous?02:27
dobeyfor definitions of instantaneous that depend on your network speed, and whether any errors happened02:28
dobeyand also possibly if you called lp_save()02:28
tewardwell unless i botched the code...02:28
tewarddobey: https://gist.githubusercontent.com/teward/5d17e366f2dca158b171/raw/065fd7f2726d42456388200ee33b7ebab8702ce0/launchpad-close-karmic-bugs.py  <-- note: first time working with the API, basically following wgrant's example verbatim02:30
dobeyteward: move the lp_save to after the message creation02:31
wgranttask.status, not task.bug.status02:31
wgrantlp_save is fine where it is.02:31
dobeyof course, that might not fix it02:31
wgrantMethods are instantaneous; they don't require a save.02:31
wgrantOnly attribute changes require a save.02:32
dobeytrue02:32
dobeybut when reading the code it looks weird with the save in the middle :)02:32
tewardwell, to appease dobey, i'll move the lp_save to the end there.  let me run this again...02:33
tewardeverything else looks fine, though, for the most part?02:33
dobeyaside from the thing wgrant mentioned, yeah02:34
tewardmmm... looks like it still didn't do anything02:34
tewardand net speed here is 105Mbps download, 15Mbps upload, just checked and confirmed02:34
tewardso IDK02:34
* teward shrugs02:34
wgrantHave you confirmed it found the bugs?02:34
tewardwgrant: no i haven't - any way to output what it finds?  again, new to the API02:35
dobeyright, get the list prior to the loop and ensure it's not empty02:35
wgrantprint on each iteration of the loop?02:35
tewardgod i need to learn this api... >.>02:37
tewardwgrant: print task.bug.id, or what?  sorry if i'm sounding handholdy, i'm just wholly unfamiliar with the API as it currently stands02:37
wgrantOr print task02:37
tewardthat works02:38
tewardoh, that's why, it didn't find anything...02:38
wgrantYou may have to explicitly search for "Incomplete (with response)" and "Incomplete (without response)"02:39
dobeyi've never had to do that for incompletes02:39
wgrantAh, of course, omit_targeted.02:39
tewardmmm, possibly... still prints no results if i expand the searchTasks(status=[ ... to include that02:40
wgrantI didn't think so, but that was the obvious thing.02:40
wgrantGive omit_targeted=False02:40
tewardTHERE we go02:41
tewardnow it's giving the 6 bug tasks... it should now work and mark them "Won't Fix" if I did this right...02:41
dobeywell, i don't even remember why i came back into my office this late now, so later :)02:43
tewarddobey: see ya, thanks for all the assistance :)02:43
tewardwgrant: whooo, it works!  thanks again.02:44
wgrantYay.02:44
tewardhow SIMPLE this is :)02:44
tewardwgrant: only question i have left... is it possible to target a specific package with the API?02:45
tewarda variant of this script might be executed come EOL times for any nginx bugs against the EOL release.02:45
teward(since that's the package i primarily watch)02:45
wgrantteward: getSourcePackage(name='nginx') on either the series or the distribution.02:45
wgranthttps://launchpad.net/+apidoc/devel.html documents the entire API.02:45
tewardwonderful.  Thanks, wgrant02:46
tewardand again, sorry for needing the handholding02:46
wgrantnp, glad you got it sorted out.02:46
tewardwgrant: at least this can be run against qastaging or staging until i get it doing all that I want it to... that definitely helps a bit02:47
tewardwgrant: last question - because i'm rusty as all hell with python.  If I want to include line breaks in the message content, is it just \r or \n, or \r\n02:51
wgrantteward: Launchpad will cope with either. But one normally uses \n unless on Windows.02:52
tewardwgrant: ack, thanks03:07
tewardwgrant: interesting issue - it left 27 bugs in qastaging untouched - i had to wait 5 minutes and run it again and it got the last 27 bugs on qastaging...03:55
* teward shrugs03:55
dominic1134www.openas.org - an open-source Anti-Spam appliance - We're still looking for contributers, volunteers and supporters. Check it out!07:26
cjwatsonteward: When you retrieve collections of things from the API, they're batched, and the client only fetches the next batch when it needs to.  This can introduce confusion if you're mutating the collection as you go.  If you definitely intend to operate on the entire collection, it can be handy to wrap it in list() to force the whole thing to be materialised on the client in advance.09:42
lifelessits also possible that other agents are mutating the list09:45
lifelessits a concurrent system and IIRC we didn't get around to implementing the stable batch markers design.09:45
cjwatsonRight, that too, but when operating on qas and missing 27 items I know which is more likely :-)09:46
cjwatson(Apologies for slight incoherency, a small motor vehicle^W^W^Wcat was demanding my attention)09:47
lifelesscjwatson: :)09:47
cjwatsonThe irony is we don't even have a cat09:50
cjwatsonBut we do have one extremely determined to adopt us ...09:51
lifelessthere are worse things09:54
sergio-br22hello15:38
sergio-br22I'm having problem with versions in launchpad15:39
sergio-br22I messed up with one package, the right version was 1.0.2, but it was with 1.8.0... so I changed the changelog for the right version, and now I can't publish15:40
sergio-br22ahh, i think I managed to fix that16:21
=== cprov__ is now known as cprov_
=== Ursinha_ is now known as Ursinha
=== Peng_ is now known as Peng
=== tsimpson_ is now known as tsimpson
=== NikitaKonovalov2 is now known as NikitaKonovalov
=== nesthib_ is now known as nesthib
=== Spads_ is now known as Spads
=== igitoor_ is now known as igitoor
=== nesthib is now known as Guest36803
=== vidplace7__ is now known as vidplace7_
=== stgraber_ is now known as stgraber
=== funnel_ is now known as funnel
blueyedWhat terminal are the daily builds running on?20:31
blueyedThere is a problem with some Vim test: https://groups.google.com/d/msg/vim_dev/x-ZqAWBYfL0/PCt-HaJlCxEJ20:32
=== daker__ is now known as daker
wgrantblueyed: TERM is unset when the build starts. If you have special requirements, you need to handle them in the build yourself.20:43
blueyedwgrant: does this apply to builds in general or only the daily builds?20:45
wgrantblueyed: All binary package builds use that environment.20:45
wgrantThere's no distinction between daily and non-daily binary package builds; only the way the source gets into Launchpad differs.20:46
blueyedHmm. Then I wonder why the vim-daily build fails, but the one for Ubuntu does not. I am using the Debian packaging, where debian/rules is similar, except that Ubuntu ignores some other test.20:49
wgrantblueyed: The test wasn't changed recently upstream?20:55
blueyedwgrant: good point. It was, but I cannot say really if it is related. Where's the last build log for Ubuntu?20:59
wgranthttps://launchpad.net/ubuntu/+source/vim21:00
wgrantPick the version you're interested in.21:00
dominic1134Hi guys, I'm wondering what anti-spam appliances / gateways you're deploying in a typical business environment? Which features do you use and would you like to have in a typical product like this? We're currently developing a open-source e-mail security appliance and would be happy for your suggestions. See www.openas.org and https://launchpad.net/open-as-cgw22:01
=== cprov_ is now known as crov
=== crov is now known as cprov
=== Nigel_ is now known as G

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