[04:12] <reactormonk> Timeout on https://bazaar.launchpad.net/~scompall/typelevel-course/trunk/view/head:/answers/src/main/scala/shapeless/DI.scala#L79
[04:14] <reactormonk> ah, there we go.
[09:31] <Odd_Bloke> cjwatson: 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:43] <Odd_Bloke> (wgrant: ^)
[09:44] <Odd_Bloke> (I always have it in my head you're US-time-zoned, despite actual facts :p)
[09:44] <wgrant> I'm flexibly time-zoned.
[09:44] <Odd_Bloke> You are a time zone unto yourself.
[09:44] <wgrant> Odd_Bloke: So you're getting https://api.launchpad.net/[...] URLs from your API client, and then giving them to something else to download?
[09:45] <Odd_Bloke> wgrant: We're doing a build.getFileUrls() and then iterating over those.
[09:45] <wgrant> Also how are you having a private LiveFSBuild?
[09:45] <wgrant> Just a private PPA?
[09:45] <Odd_Bloke> Yeah, I think so.
[09:46] <Odd_Bloke> https://launchpad.net/~cloudware/+livefs/ubuntu/xenial/utlemming-cpc-amd64-20151209-xenial/+build/45690 <-- e.g.
[09:46] <wgrant> Hmmm.
[09:46] <Odd_Bloke> So we're getting URLs that are the above + /+files/...
[09:47] <wgrant> Many 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] <wgrant> s/them/other private files/
[09:47] <wgrant> I need to EOD now, hopefully Colin can sort it out, otherwise I'll try to have a look tomorrow.
[09:48] <Odd_Bloke> Cool, 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:49] <wgrant> No, you at least need to request the URL and get the redirect location using an authenticated client.
[09:49]  * wgrant vanishes.
[09:54] <Odd_Bloke> An lp._browser.get(...) still hits the 404.
[09:55] <Odd_Bloke> But I'll stop digging on this until I have someone to guide me in roughly the right direction. :p
[10:27] <karni> cjwatson: 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 fine
[11:36] <cjwatson> wgrant: How would that even work?  I thought OAuth was only checked for webservice publications.
[11:37] <wgrant> cjwatson: It is, but you can request those paths on the webservice and they'll redirect fine.
[11:37] <cjwatson> karni: I'll need as exact as possible a timestamp for when you attempted the push so that I can correlate with logs.
[11:37] <wgrant> Even if the method doesn't return them.
[11:37] <cjwatson> Oho.
[11:37] <wgrant> lp._browser.get sounds roughly right.
[11:37] <wgrant> With the caveat that you need to mangle the URL.
[11:38] <cjwatson> I think that might send Accept: application/json too, but yeah.
[11:38] <cjwatson> If all else fails there's lp._browser._connection.request
[11:38] <wgrant> The URL isn't likely to care about the Accept.
[11:39] <karni> cjwatson: sure. I can do it again and provide the timestamp, I guess that'll be easier for you. I'll ping you shortly.
[11:40] <Odd_Bloke> cjwatson: wgrant: So how would I need to mangle the URL?
[11:41] <cjwatson> Odd_Bloke: launchpad.net -> api.launchpad.net/devel
[11:41] <cjwatson> Just tested that with lp._browser.get(), it does indeed work fine
[11:41] <Odd_Bloke> Indeed it does.
[11:44] <karni> cjwatson: http://paste.ubuntu.com/13891368/
[11:44] <cjwatson> karni: thanks, will see if I can dig something out of logs
[11:44] <karni> cjwatson: as mentioned, the push to lp-karni remote works fine,so I guess my ssh/lp setup is fine. sure, thanks.
[11:48] <cjwatson> karni: appears to be hitting http://paste.ubuntu.com/13891491/
[11:48] <cjwatson> ah, but before that
[11:49] <cjwatson> 2015-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 Team
[11:49] <Odd_Bloke> Next 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:51] <cjwatson> Odd_Bloke: there's lp._browser._connection.authorizer.authorizeRequest buried in there, which may be useful
[11:51] <cjwatson> see lazr/restfulclient/_browser.py:RestfulHttp
[11:52] <Odd_Bloke> Yeah, 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:53] <cjwatson> karni: 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] <cjwatson> karni: Perhaps that project ought to have a more sensible maintainer team
[11:54] <wgrant> Odd_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] <wgrant> cjwatson: I wouldn't be surprised if there was a Unicode safety issue there somewhere...
[11:55] <cjwatson> Yeah, it could be pre-existing.
[11:55] <Odd_Bloke> wgrant: Oh, good idea.
[11:56] <wgrant> cjwatson: Oh, I didn't see the traceback, so unicode indeed.
[11:57] <wgrant> Probably never worked, though I'm surprised that part of the test suite passes under Python 3. Hm.
[11:57] <cjwatson> I was going to request an upgrade soon anyway, so let me see if it's easy to fix.
[11:57] <wgrant> Oh, I bet e.faultString is only unicode when it's convenient.
[11:58] <wgrant> Slap a .encode('utf-8') in there when it's unicode and all should be good, hopefully...
[12:09] <cjwatson> $ curl -is https://git.qastaging.paddev.net/ | grep ^X-Turnip-Revision:
[12:09] <cjwatson> X-Turnip-Revision: 93ce4af4cb28c61d777a1e2baf26460baf71246d
[12:10] <cjwatson> gitygitgit
[12:25] <cjwatson> wgrant: I'm not convinced we exercise that path in the test suite right now.
[12:33] <cjwatson> Oh, we hit it in the functional tests.
[13:02] <Odd_Bloke> cjwatson: wgrant: Right, I think I've got something that works.  Thanks for the help!
[13:02] <cjwatson> Excellent
[13:22] <karni> cjwatson: sorry, missed the messages! reading now
[13:23] <karni> cjwatson: I see, that makes sense. At least I know what the problem is :)
[13:23] <karni> cjwatson: Thanks for looking into it
[13:24] <cjwatson> karni: https://git.launchpad.net/turnip/commit/?id=2e0ef6f29e97750279a67627ce50d2e47588df04, will try to get that rolled out soon
[13:26] <karni> cjwatson: oh haha was it my name again :D (again: not the first time something failed because of the 'ł' :D)
[13:26] <karni> that, plus not member of the team :)
[13:26] <karni> quick reaction, cool :)
[13:26] <cjwatson> Afraid so.  We try to test for that these days, but apparently didn't quite catch everything
[13:27] <karni> nah that's okay :)
[14:23] <mapreri> so, launchpad's git → bzr importer choke on repository with signed commits? https://launchpadlibrarian.net/210728636/vcs-imports-pbuilder-trunk.log
[14:24] <mapreri> (like the one I'm used to do)
[14:24] <cjwatson> Yes
[14:24] <cjwatson> https://bugs.launchpad.net/ubuntu/+source/bzr-git/+bug/1084403
[14:24] <mapreri> cool! (no) :)
[14:24] <mapreri> ok, I'll just wait on git mirrors :P