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

/libraries returns wrong data for some libraries #56

Open
MartinKolarik opened this issue Aug 17, 2021 · 4 comments
Open

/libraries returns wrong data for some libraries #56

MartinKolarik opened this issue Aug 17, 2021 · 4 comments

Comments

@MartinKolarik
Copy link

Details

Description

The filename and latest (not sure if any other) fields return incorrect values via /libraries endpoint for some libraries, while correct data is returned via /libraries/:library endpoint.

Steps to reproduce

Data for a library "caf" as returned by https://api.cdnjs.com/libraries?fields=name,latest,version,filename:

{
    "name": "caf",
    "latest": "https://cdnjs.cloudflare.com/ajax/libs/caf/13.1.1/caf.js",
    "version": "13.1.1",
    "filename": "caf.js"
},

Data for the same library as returned by https://api.cdnjs.com/libraries/caf?fields=name,latest,version,filename:

{
    "name": "caf",
    "latest": "https://cdnjs.cloudflare.com/ajax/libs/caf/13.1.1/umd/caf.js",
    "version": "13.1.1",
    "filename": "umd/caf.js"
}

Expected behavior

/libraries should return the same data as /libraries/:library

Logs

N/A

@MattIPv4
Copy link
Member

@MattIPv4
Copy link
Member

I just ran a manual re-update of the library to trigger a reindex in Algolia (which is what backs our libraries search endpoint, rather than our own metadata the backs the individual library routes), and it seems to have resolved this:

https://api.cdnjs.com/libraries?fields=name,latest,version,filename&search=caf

{"results":[{"name":"caf","latest":"https://cdnjs.cloudflare.com/ajax/libs/caf/13.1.1/umd/caf.js","version":"13.1.1","filename":"umd/caf.js"}],"total":1,"available":1}

@MattIPv4
Copy link
Member

@tc80 I wonder if, once we've done our latest set of maintenance to the bot, it'd be worth doing a reindex of the latest versions of every library in Algolia -- might resolve other libraries that have this issue, as well as the missing SRI & null version issues?

@MartinKolarik
Copy link
Author

once we've done our latest set of maintenance to the bot, it'd be worth doing a reindex of the latest versions of every library in Algolia

That seems like a good idea as there are certainly more libraries with this problem right now.

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

No branches or pull requests

2 participants