/srv/irclogs.ubuntu.com/2015/12/10/#launchpad.txt

reactormonkTimeout on https://bazaar.launchpad.net/~scompall/typelevel-course/trunk/view/head:/answers/src/main/scala/shapeless/DI.scala#L7904:12
reactormonkah, there we go.04:14
=== su_v_ is now known as su_v
Odd_Blokecjwatson: We have a script which downloads the 'Built files' from a livefs build; it doesn't work when a livefs build is private because we don't do any authentication.  Is there a way to get a restricted.launchpadlibrarian.net link for the build artifacts through the API (with which we are authenticated)?09:31
Odd_Bloke(wgrant: ^)09:43
Odd_Bloke(I always have it in my head you're US-time-zoned, despite actual facts :p)09:44
wgrantI'm flexibly time-zoned.09:44
Odd_BlokeYou are a time zone unto yourself.09:44
wgrantOdd_Bloke: So you're getting https://api.launchpad.net/[...] URLs from your API client, and then giving them to something else to download?09:44
Odd_Blokewgrant: We're doing a build.getFileUrls() and then iterating over those.09:45
wgrantAlso how are you having a private LiveFSBuild?09:45
wgrantJust a private PPA?09:45
Odd_BlokeYeah, I think so.09:45
Odd_Blokehttps://launchpad.net/~cloudware/+livefs/ubuntu/xenial/utlemming-cpc-amd64-20151209-xenial/+build/45690 <-- e.g.09:46
wgrantHmmm.09:46
Odd_BlokeSo we're getting URLs that are the above + /+files/...09:46
wgrantMany years ago I think I used some heavily underscored expression to use launchpadlib's OAuth-aware HTTP client to download them, but I don't quite recall exactly how.09:47
wgrants/them/other private files/09:47
wgrantI need to EOD now, hopefully Colin can sort it out, otherwise I'll try to have a look tomorrow.09:47
Odd_BlokeCool, thanks for taking a quick look. :)09:48
Odd_Bloke(And at least confirming that there isn't a blindingly obvious way of doing it that I'm missing :p)09:48
wgrantNo, you at least need to request the URL and get the redirect location using an authenticated client.09:49
* wgrant vanishes.09:49
Odd_BlokeAn lp._browser.get(...) still hits the 404.09:54
Odd_BlokeBut I'll stop digging on this until I have someone to guide me in roughly the right direction. :p09:55
karnicjwatson: git remote add lp lp:gstspotify && git push lp <feature branch> --> just sits there doing nothing. when I pushed to a remote lp:~karni/gstspotify it worked fine10:27
cjwatsonwgrant: How would that even work?  I thought OAuth was only checked for webservice publications.11:36
wgrantcjwatson: It is, but you can request those paths on the webservice and they'll redirect fine.11:37
cjwatsonkarni: I'll need as exact as possible a timestamp for when you attempted the push so that I can correlate with logs.11:37
wgrantEven if the method doesn't return them.11:37
cjwatsonOho.11:37
wgrantlp._browser.get sounds roughly right.11:37
wgrantWith the caveat that you need to mangle the URL.11:37
cjwatsonI think that might send Accept: application/json too, but yeah.11:38
cjwatsonIf all else fails there's lp._browser._connection.request11:38
wgrantThe URL isn't likely to care about the Accept.11:38
karnicjwatson: sure. I can do it again and provide the timestamp, I guess that'll be easier for you. I'll ping you shortly.11:39
Odd_Blokecjwatson: wgrant: So how would I need to mangle the URL?11:40
cjwatsonOdd_Bloke: launchpad.net -> api.launchpad.net/devel11:41
cjwatsonJust tested that with lp._browser.get(), it does indeed work fine11:41
Odd_BlokeIndeed it does.11:41
karnicjwatson: http://paste.ubuntu.com/13891368/11:44
cjwatsonkarni: thanks, will see if I can dig something out of logs11:44
karnicjwatson: as mentioned, the push to lp-karni remote works fine,so I guess my ssh/lp setup is fine. sure, thanks.11:44
cjwatsonkarni: appears to be hitting http://paste.ubuntu.com/13891491/11:48
cjwatsonah, but before that11:48
cjwatson2015-12-10 11:42:02+0000 [-] [request-id=86849737-5f7a-48ea-aba6-bb43fab6cbb3] Dying: turnip virt error: FORBIDDEN Michał Karnicki is not a member of PS Project Management Team11:49
Odd_BlokeNext fun problem: how to download an image this way without pulling the entire thing down in to memory. ^_^11:49
Odd_Bloke(I'm going to see if I can extract enough OAuth information from the lp object to hand off to requests, which what we use now)11:49
cjwatsonOdd_Bloke: there's lp._browser._connection.authorizer.authorizeRequest buried in there, which may be useful11:51
cjwatsonsee lazr/restfulclient/_browser.py:RestfulHttp11:51
Odd_BlokeYeah, I'm hoping I'll be able to pull out the required attributes from .authorizer and pass them in to a requests-oauthlib session.11:52
cjwatsonkarni: so it's definitely a bug that you didn't get a sensible error, probably tickled by our recent upgrade to a more current version of Twisted.  But the proximate cause is that the weird weird way that PS handles maintenance of projects means that you don't have permission to set the default repository for gstspotify.11:53
cjwatsonkarni: Perhaps that project ought to have a more sensible maintainer team11:53
wgrantOdd_Bloke: The easiest thing to do is probably to ask launchpadlib's thing to not follow the redirect, so you can get a response with a Location header that you can download separately.11:54
wgrantcjwatson: I wouldn't be surprised if there was a Unicode safety issue there somewhere...11:54
cjwatsonYeah, it could be pre-existing.11:55
Odd_Blokewgrant: Oh, good idea.11:55
wgrantcjwatson: Oh, I didn't see the traceback, so unicode indeed.11:56
wgrantProbably never worked, though I'm surprised that part of the test suite passes under Python 3. Hm.11:57
cjwatsonI was going to request an upgrade soon anyway, so let me see if it's easy to fix.11:57
wgrantOh, I bet e.faultString is only unicode when it's convenient.11:57
wgrantSlap a .encode('utf-8') in there when it's unicode and all should be good, hopefully...11:58
cjwatson$ curl -is https://git.qastaging.paddev.net/ | grep ^X-Turnip-Revision:12:09
cjwatsonX-Turnip-Revision: 93ce4af4cb28c61d777a1e2baf26460baf71246d12:09
cjwatsongitygitgit12:10
cjwatsonwgrant: I'm not convinced we exercise that path in the test suite right now.12:25
cjwatsonOh, we hit it in the functional tests.12:33
=== verterok is now known as verterok-away
Odd_Blokecjwatson: wgrant: Right, I think I've got something that works.  Thanks for the help!13:02
cjwatsonExcellent13:02
karnicjwatson: sorry, missed the messages! reading now13:22
karnicjwatson: I see, that makes sense. At least I know what the problem is :)13:23
karnicjwatson: Thanks for looking into it13:23
cjwatsonkarni: https://git.launchpad.net/turnip/commit/?id=2e0ef6f29e97750279a67627ce50d2e47588df04, will try to get that rolled out soon13:24
karnicjwatson: oh haha was it my name again :D (again: not the first time something failed because of the 'ł' :D)13:26
karnithat, plus not member of the team :)13:26
karniquick reaction, cool :)13:26
cjwatsonAfraid so.  We try to test for that these days, but apparently didn't quite catch everything13:26
karninah that's okay :)13:27
mapreriso, launchpad's git → bzr importer choke on repository with signed commits? https://launchpadlibrarian.net/210728636/vcs-imports-pbuilder-trunk.log14:23
mapreri(like the one I'm used to do)14:24
cjwatsonYes14:24
cjwatsonhttps://bugs.launchpad.net/ubuntu/+source/bzr-git/+bug/108440314:24
ubot5Ubuntu bug 1084403 in bzr-git (Ubuntu) "no support for gpgsig tags" [High,Triaged]14:24
maprericool! (no) :)14:24
mapreriok, I'll just wait on git mirrors :P14:24
=== verterok-away is now known as verterok

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