Perl 6 - the future is here, just unevenly distributed

IRC log for #metacpan, 2016-09-12

| Channels | #metacpan index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
06:48 oiami joined #metacpan
07:06 neilb joined #metacpan
08:09 Relequestual joined #metacpan
08:11 osfabibisi joined #metacpan
08:11 neilb joined #metacpan
09:02 neilb joined #metacpan
09:54 Tux joined #metacpan
14:03 Khisanth joined #metacpan
14:26 oiami joined #metacpan
15:20 karjala Hello, I maintain perlmodules.net. I was told that my POST query that fetches latest releases from MetaCPAN also fetches unauthorized releases, resulting in the undesired effect that my module feeds contain unauthorized releases (with messed-up diffs). Could you please tell me if my query fetches unauthorized releases, and how to fix the query? Thanks:
15:20 karjala paste.scsys.co.uk/533625?tidy=on&hl=on&submit=Format+it!
15:22 karjala the useragent is Mojo::UserAgent
15:23 karjala hopefully you know the answer by heart, and can save me hours of going through documentation to fix my query with uncertain results
15:25 oalders karjala: you should add a status of 'latest' to your query. see https://github.com/metacpan/metacpan-examples/blob/master/scripts/endpoints/release/4-latest-release-versions-es.pl
15:26 karjala oalders: but doesn't it take half an hour for a release to get the "latest" flag set?
15:27 oalders karjala: it can take a while, yes
15:27 oalders it runs via cron
15:27 karjala what if two reeleases of the same distro come out in the same hour, won't only one of the two get the "latest" flag set to true/
15:27 karjala ?
15:28 karjala in that case, I will only fetch only one of them, won't I?
15:28 oalders if they're quite close together that could happen
15:28 oalders or, you could just fetch them all and check the status on your end
15:29 karjala Isn't there another way to check for unauthorized releases?
15:29 karjala to filter out unauthorized releases I mean
15:29 oalders you could check that authorized is true.  see the release mapping http://api.metacpan.org/v0/release/_mapping
15:30 oalders i assume you're using v0 of the api?
15:30 karjala yes v0
15:53 dolmen joined #metacpan
15:57 karjala oalders: I'll check that authorized is true. Do you see any downside to not checking the "latest" flag at all?
15:58 oalders for your use case that should be fine
16:25 karjala I have a question: Can two releases (one authorized and one unauthorized) have the same release name? like "YAML-LibYAML-0.71"
16:26 karjala the name field has a unique index in my database, but I suspect that's wrong.
16:28 jberger karjala: PAUSE shouldn't allow that to be uploaded
16:29 jberger so IIUC you are ok
16:30 karjala jberger + others: does that mean that just anyone can use up version numbers of your release?
16:30 karjala ok
16:30 karjala I can release unauthorized Mojolicious 8.00 ?
16:30 karjala and stop sri from doing so in the future ?
16:31 jberger the tarball name doesn't have to have the same version number I don't THINK
16:31 jberger just that the filenames have to be unique
16:31 jberger hmmmm, which brings me back to your previous question
16:31 jberger and I'm at the limit of my knowledge
16:32 jberger gotta run that one up the ladder I guess
16:47 oalders ether ^^
16:48 * ether 's ears burn
16:49 Grinnz karjala: tarball names are only unique per author (since they're actually filenames)
16:50 karjala ok thx
16:50 ether right, it's "FOOBAR/YAML-LibYAML-0.71.tar.gz" that's the unique name
16:50 ether if someone else uploads the same tarball under their name...
16:50 jberger ether: ah right, see I shouldn't split my attention
16:50 ether - if they have permissions for the module, it will get indexed (and your upload will be removed from the index)
16:50 ether - if they do not have permissions, no changes are made to the index.
16:50 jberger ether++
16:51 oalders ether++
16:51 ether the uniqueness check needs to pass first, and then the usual indexing rules apply
16:51 ether so if you made a mistake with your own tarball, you can upload a new one (with identical contents) by renaming the tarball to something else
16:51 ether e.g. YAML-LibYAML-0.71-fixed.tar.gz
16:53 ether s/with identical contents/with the same version, but other bits fixed/  # duh, if it's entirely identical, why bother uploading a new one :)
16:53 karjala what if two authorized users both each upload YAML-LibYAML-0.71.tar.gz, will this distro then have two official versions 0.71 ?
16:53 ether I hope that's all as clear as mud :D
16:56 Grinnz karjala: the second uploaded will remain indexed
16:56 karjala ah
16:56 karjala ether++ Grinnz++
16:56 Grinnz and that's what will get the "latest" flag in metacpan
17:24 neilb joined #metacpan
17:32 oiami joined #metacpan
17:54 ranguard karjala: please add your details to https://github.com/metacpan/metacpan-api/wiki/API-Consumers
17:54 ranguard oh, it's there already! - ignore me!
17:55 ranguard but you might also want to read https://github.com/metacpan/metacpan-api/wiki/MetaCPAN-V1-announcement-and-migration-plan :)
18:44 karjala ranguard: I didn't understand: is there going to be a transition period during which both v0 & v1 will function correctly?
18:44 karjala how long will that be?
19:09 ranguard karjala: fastapi.metacpan.org/v1 is in beta now
19:09 ranguard we hope to switch it to production *handwave* soon
19:10 ranguard we'll maintain v0 (other than for user related data) until at least early 2017
19:10 karjala ok
19:11 ranguard karjala: v1 is mostly stable - and worth testing against, but we can't promise it won't got down for a few days (if we needed to do a full re-index) befoer becoming production
19:13 karjala ok
20:21 Tux If Doug is here too, Doug++; # rebuilding cpantesters results for metacpan
20:22 ether preaction++
20:26 ranguard perl++ # lots of nice people working hard
21:35 neilb joined #metacpan
21:53 [Tux] Date: Mon, 12 Sep 2016 23:01:17 +0200 (CEST)
21:53 [Tux] [Timeout] ** [https://fastapi.metacpan.org:443]-[599] Timed out while waiting for socket to become ready for reading, called from sub Search::Elasticsearch::Role::Client::Direct::Main::scroll_helper at /pro/lib/perl5/site_perl/5.22.0/MetaCPAN/Client/Request.pm line 147. With vars: {'status_code' => 599,'request' => {'serialize' => 'std','body' => {'query' => {'term' => {'distribution' => 'DBD-CSV'}}},'path' => '/v1/favorite/_search','ignore' =>
21:53 [Tux] [],'method' => 'POST','mime_type' => 'application/json','qs' => {'search_type' => 'scan','size' => 1000,'scroll' => '5m'}}}
22:27 batman joined #metacpan
23:14 gordonfish joined #metacpan

| Channels | #metacpan index | Today | | Search | Google Search | Plain-Text | summary