/srv/irclogs.ubuntu.com/2022/02/01/#launchpad.txt

=== jchittum_ is now known as jchittum
cpaelzerHi, I'm looking for an advice as I feel to be too blind to see the obvious :-/10:18
cpaelzerlp api has the great searchTasks method which I used a lot in the past10:19
cpaelzerbut now I happened to want to "get the tasks of a known bug number"10:19
cpaelzerand by ignorance or not knowing what term to look for I couldn't find an argument to searchTasks looking for bug numbers10:19
cpaelzernot too much of a problem I thought as I could get the bug directly and use the bug_tasks_collection_link10:20
cpaelzerlike10:20
cpaelzerlaunchpad.bugs[1955009].bug_tasks_collection_link10:20
cpaelzerwhich gives (in the example): https://api.launchpad.net/devel/bugs/1955009/bug_tasks10:20
ubottuLaunchpad bug 1955009 in moonshot-gss-eap (Ubuntu) "Freeradius 3.0.21+dfsg-3build1 fails test of moonshot-gss-eap" [Undecided, Triaged]10:20
cpaelzerand then - per doc - https://help.launchpad.net/API/launchpadlib#Persistent_references_to_Launchpad_objects10:20
cpaelzerI thought I could just load it to get my list of tasks that I originally wanted tom searchTasks10:21
cpaelzerbut launchpad.load() on that URL fails badly falling into some recursion death10:21
cpaelzerso I'm puzzled and pretty sure I'm just overlooking the better way to "get a task from a known bug number"10:22
cpaelzerany hints welcome10:22
cpaelzercjwatson: ^^ I expect you read this channel anyway, but since the topic lists you on-duty a ping can't hurt10:23
cpaelzeroh - it seems to be as silly as I expected, the fetch works and the debug printing it triggers this10:24
cpaelzerlet me rework that ...10:24
rbasakcpaelzer: 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 suffix10:38
cjwatsoncpaelzer: You could just use bug_tasks rather than bug_tasks_collection_link10:38
cjwatsonsnap-ish10:38
rbasakSo try launchpad.bugs[1955009].bug_tasks_collection to get the object10:38
cjwatsonbug_tasks *not* bug_tasks_collection10:38
cjwatson_collection_link is additionally special :)10:39
rbasakAh, sorry10:39
cpaelzerinteresting, so like launchpad.bugs[1955009].bug_tasks ?10:40
rbasakYep10:41
cjwatsoncpaelzer: There's a relevant example of exactly this on https://help.launchpad.net/API/launchpadlib#Collections10:43
cpaelzerthank you cjwatson and rbasak - yes this makes me see what was hidden to me before10:44
cpaelzerthat exmaple helps, but I'd have expected that https://launchpad.net/+apidoc/1.0.html#bug would then have a "bug_tasks" entry10:45
cpaelzeror rather "example"10:45
cjwatsonThe apidoc describes the generic HTTP-level interface rather than launchpadlib's client-specific wrapping of it10:46
cjwatson(or rather lazr.restfulclient's)10:46
cpaelzerok, thanks for filling in the puzzle pieces10:47
blakerI 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
cjwatsonblaker: 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 account15:11
RikMillsseem to be getting an awful lot of build fail with no log20:31
cjwatsonYes, there's a known issue with bos02, let me add that to the topic20: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
RikMillsthanks!20:33

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