I've noticed that a number of list calls now return only one page of results by default, whereas before if no page was specified, the call would return them all. So far noticed with issue lists, pr lists, and project lists.
This is an incompatible api change and breaks any code that was relying on getting all such items in this way.
side note: is pagination stable? If I query page after page, and something changes in the middle, could I miss an item (or see a duplicate) due to alignment shifts?
Indeed and as such was announced in the release notes: https://docs.pagure.org/pagure/changelog.html#id2 (4th point from the top).
Good point, I suspect not :(
Why was an incompatible change required? Was the default creating memory load issues?
Is there any way a call can explicitly ask for all the results?
One of the API endpoint was returning almost the entire database making it a very easy DDoS attack point (query a few time that endpoint and you were bringing the server down on very large deployment).
Nope, you can ask up to 100 results per page, but you have to go through each page
Is there a recommended way for iterating over the pages in general? I've sort of hacked up a workaround in my code for now. The challenges I'm seeing are:
(trying to avoid rewriting the same code for every call)