Let get_versions() handle pagination
Ichimonji10 opened this issue · 5 comments
pulp_smash.pulp3.utils.get_versions()
works well so long as only one page of results is returned. If there are multiple pages of results, when the method will return incorrect results. This is OK in the short term, with a small test suite and simple tests, but it will silently produce incorrect results long-term. The method should be re-written to handle the case where multiple pages of results are returned. I suggest writing a generator that walks through all pages of results and yields them one by one, and letting get_repo_versions()
use that generator.
get_artifact_paths()
should also be made to handle pagination. See #919.
Perhaps, add a new callback to the api.Client, to handle pagination.
This is done. The relevant work is spread out over about ten commits, in a branch in my repo. I'm submitting the PRs one at a time, to make reviews easier.
@Ichimonji10, thanks.
This issue has ben solved by a string of other commits. The most important change is that there is now a page_handler
callback function for paging through responses.