Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API call for reverse_dependencies fails for Attribute-Handlers #1050

Open
jkeenan opened this issue Mar 1, 2022 · 3 comments
Open

API call for reverse_dependencies fails for Attribute-Handlers #1050

jkeenan opened this issue Mar 1, 2022 · 3 comments

Comments

@jkeenan
Copy link

jkeenan commented Mar 1, 2022

The following API call to fastapi.metacpan.org succeeds:

$ curl https://fastapi.metacpan.org/reverse_dependencies/dist/List-Compare > result.json; head result.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  543k  100  543k    0     0  1167k      0 --:--:-- --:--:-- --:--:-- 1167k
{
   "data" : [
      {
         "archive" : "Code-TidyAll-0.81.tar.gz",
         "id" : "rLLAi_NSMYS1zQR7xXUYu5vgaMY",
         "maturity" : "released",
         "tests" : {
            "fail" : 6,
            "pass" : 228,
            "na" : 0,

As does this one:

$ curl https://fastapi.metacpan.org/reverse_dependencies/dist/Term-ReadLine > result.json; head result.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  733k  100  733k    0     0  1694k      0 --:--:-- --:--:-- --:--:-- 1694k
{
   "data" : [
      {
         "resources" : {
            "homepage" : "http://netdisco.org/",
            "bugtracker" : {
               "web" : "https://github.com/netdisco/netdisco/issues"
            },
            "repository" : {
               "url" : "https://github.com/netdisco/netdisco"

But this call fails:

$ curl https://fastapi.metacpan.org/reverse_dependencies/dist/Attribute-Handlers > result.json; head result.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    76  100    76    0     0    377      0 --:--:-- --:--:-- --:--:--   378
{
   "code" : 404,
   "message" : "The requested info could not be found"
}

This is unexpected. Attribute-Handlers, just like Term-ReadLine, is a dual-life CPAN release of a distribution maintained by Perl 5 Porters in the dist/ directory of the core distribution. So I would expect the call to succeed. Furthermore, reverse dependencies for Attribute::Handlers show up in the GUI at https://metacpan.org/module/Attribute::Handlers/requires?size=200.

Can you explain this anomaly?

@mickeyn mickeyn transferred this issue from metacpan/MetaCPAN-Client Mar 2, 2022
@Grinnz
Copy link
Contributor

Grinnz commented Mar 2, 2022

distnames are not a "real" thing in PAUSE or dependency trees, so I would recommend doing lookups by module name instead if this is possible. (that said, I don't have an answer to the question)

@mickeyn
Copy link
Contributor

mickeyn commented Mar 2, 2022

@Grinnz you are right, but we do have an endpoint for dist level reverse dependencies in the dist page - so we do have
logic show all dist's modules' deps.

These queries above are translated to the following behavior -

https://metacpan.org/dist/Attribute-Handlers/requires shows no results while https://metacpan.org/module/Attribute::Handlers/requires does

https://metacpan.org/dist/Type-Tiny/requires shows results as does https://metacpan.org/module/Type::Tiny/requires

So something could be a bit off.
I'll have to dig into it a bit later.

@haarg
Copy link
Member

haarg commented Feb 28, 2023

Attribute-Handlers is marked as not authorized, so it does not return results from reverse_dependencies. It's marked as not authorized because it contains three indexable modules that RJBS does not have permissions for: Demo, Descriptions, and MyClass. These modules should be marked as not indexed in the dist metadata but they are not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants