ror-community / ror-roadmap

Central information about what is happening at ROR and how to contribute feedback
10 stars 1 forks source link

[BUG] Organizations endpoint returns inconsistent lists or pages with the same request #240

Open codycooperross opened 2 months ago

codycooperross commented 2 months ago

Version The version of the ROR schema and/or API you are using: v1, v2, or unknown.

v1

Describe the bug A clear and concise description of what the bug is.

The organizations endpoint appears to return two different but internally consistent lists per page. If you refresh the following a few times, the results seem to oscillate between two lists: https://api.ror.org/organizations?filter=country.country_code:CL The same is true for every succeeding page: https://api.ror.org/organizations?filter=country.country_code:CL&page=2

To Reproduce Steps to reproduce the behavior:

  1. Make a https://api.ror.org/organizations request and refresh a few times.

Expected behavior A clear and concise description of what you expected to happen.

While paging, each page returns a consistent list of results.

Screenshots If applicable, add screenshots to help explain your problem.

Device information:

Additional context Add any other context about the problem here.

A user noticed this inconsistency while using the DataCite GraphQL API for organizations to retrieve a list of organizations with country code CL. Because the pages seem to switch around, they were retrieving duplicate results.

amandafrench commented 1 month ago

Oh, interesting. Thanks for reporting, @codycooperross. I've reproduced this in both Firefox and Chrome on my Mac. The count of organizations stays the same, so I'm assuming for the moment at least that the result list is the same, but the first returned record does change upon every request.

amandafrench commented 1 month ago

Have reproduced with this filter in v2 as well, and it also occurs with the types filter and without any filter at all (e.g., https://api.ror.org/v2/organizations).