support unlimited paging
Closed this issue · 3 comments
The repositories command needs unlimited paging support. I run this fragment daily and suddenly the found repositories count became 100:
printf "Fetching repositories..."
repos=$(docker-ls repositories | jq -r '.Repositories[]')
printf "%d repositories found\n" "$(echo "$repos" | wc -l)"
... which is weird as command usage says the default is 100, and i have made no code changes, why it found 515 before?
# less /var/log/cronlogs/gitlab-delete-build-images |grep Fetching.rep
2019-02-15 16:58:27.450820467+02:00 O: Fetching repositories...525 repositories found
2019-02-16 02:05:47.290234647+02:00 O: Fetching repositories...525 repositories found
2019-02-17 02:05:52.705250692+02:00 O: Fetching repositories...525 repositories found
2019-02-18 02:04:31.973095461+02:00 O: Fetching repositories...100 repositories found
2019-02-19 02:04:41.782786956+02:00 O: Fetching repositories...100 repositories found
2019-02-20 02:04:35.441645254+02:00 O: Fetching repositories...100 repositories found
2019-02-21 02:04:44.042338783+02:00 O: Fetching repositories...100 repositories found
2019-02-22 02:04:41.641497521+02:00 O: Fetching repositories...100 repositories found
what I mean is that I don't care how internally docker-ls fetches the repos, I want to get them all.
Hi! Barring the possibility of a bug, there is not limitation on the number of repositories that are fetched by docker-ls
. "Paging" in this context is just a detail of how the registry API works, it should not influence the result.
Have you checked that all repositories are still stored in your registry? Did anything happen between February 17th and 18th that could account for the change? What happens if you set the --page-size
parameter to, say, 50?
Closing for lack of feedback. For what it is worth, querying a repository with multiple tags works as expected for different page sizes, so paging works fine.