=== jchittum_ is now known as jchittum | ||
cpaelzer | Hi, I'm looking for an advice as I feel to be too blind to see the obvious :-/ | 10:18 |
---|---|---|
cpaelzer | lp api has the great searchTasks method which I used a lot in the past | 10:19 |
cpaelzer | but now I happened to want to "get the tasks of a known bug number" | 10:19 |
cpaelzer | and by ignorance or not knowing what term to look for I couldn't find an argument to searchTasks looking for bug numbers | 10:19 |
cpaelzer | not too much of a problem I thought as I could get the bug directly and use the bug_tasks_collection_link | 10:20 |
cpaelzer | like | 10:20 |
cpaelzer | launchpad.bugs[1955009].bug_tasks_collection_link | 10:20 |
cpaelzer | which gives (in the example): https://api.launchpad.net/devel/bugs/1955009/bug_tasks | 10:20 |
ubottu | Launchpad bug 1955009 in moonshot-gss-eap (Ubuntu) "Freeradius 3.0.21+dfsg-3build1 fails test of moonshot-gss-eap" [Undecided, Triaged] | 10:20 |
cpaelzer | and then - per doc - https://help.launchpad.net/API/launchpadlib#Persistent_references_to_Launchpad_objects | 10:20 |
cpaelzer | I thought I could just load it to get my list of tasks that I originally wanted tom searchTasks | 10:21 |
cpaelzer | but launchpad.load() on that URL fails badly falling into some recursion death | 10:21 |
cpaelzer | so I'm puzzled and pretty sure I'm just overlooking the better way to "get a task from a known bug number" | 10:22 |
cpaelzer | any hints welcome | 10:22 |
cpaelzer | cjwatson: ^^ I expect you read this channel anyway, but since the topic lists you on-duty a ping can't hurt | 10:23 |
cpaelzer | oh - it seems to be as silly as I expected, the fetch works and the debug printing it triggers this | 10:24 |
cpaelzer | let me rework that ... | 10:24 |
rbasak | cpaelzer: in general, if the API spec says something that ends in _link, then you can get the object by accessing the Python attribute name that just misses off the _link suffix | 10:38 |
cjwatson | cpaelzer: You could just use bug_tasks rather than bug_tasks_collection_link | 10:38 |
cjwatson | snap-ish | 10:38 |
rbasak | So try launchpad.bugs[1955009].bug_tasks_collection to get the object | 10:38 |
cjwatson | bug_tasks *not* bug_tasks_collection | 10:38 |
cjwatson | _collection_link is additionally special :) | 10:39 |
rbasak | Ah, sorry | 10:39 |
cpaelzer | interesting, so like launchpad.bugs[1955009].bug_tasks ? | 10:40 |
rbasak | Yep | 10:41 |
cjwatson | cpaelzer: There's a relevant example of exactly this on https://help.launchpad.net/API/launchpadlib#Collections | 10:43 |
cpaelzer | thank you cjwatson and rbasak - yes this makes me see what was hidden to me before | 10:44 |
cpaelzer | that exmaple helps, but I'd have expected that https://launchpad.net/+apidoc/1.0.html#bug would then have a "bug_tasks" entry | 10:45 |
cpaelzer | or rather "example" | 10:45 |
cjwatson | The apidoc describes the generic HTTP-level interface rather than launchpadlib's client-specific wrapping of it | 10:46 |
cjwatson | (or rather lazr.restfulclient's) | 10:46 |
cpaelzer | ok, thanks for filling in the puzzle pieces | 10:47 |
blaker | I am unable to reset my launchpad.net password, the login.launchpad.net gives me an "Invalid OpenID transaction" error after submitting my new password, and its not reset. Can't really file a bug, because I cannot login to file the bug. | 14:55 |
cjwatson | blaker: Despite the hostname, login.launchpad.net isn't something we maintain directly. Could you email isd-support@canonical.com ? That goes into the SSO support queue and is usable without a working account | 15:11 |
RikMills | seem to be getting an awful lot of build fail with no log | 20:31 |
cjwatson | Yes, there's a known issue with bos02, let me add that to the topic | 20:32 |
=== cjwatson changed the topic of #launchpad to: bos02 networking broken | Help contact: @cjwatson (10:00-18:00 UTC Mon-Fri) | Launchpad is an open source project: https://dev.launchpad.net/ | This channel is logged: http://irclogs.ubuntu.com | User Guide https://help.launchpad.net | Support and spam reporting: https://answers.launchpad.net/launchpad | ||
cjwatson | (I don't know exactly what the problem is. IS has been investigating) | 20:33 |
RikMills | thanks! | 20:33 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!