Dynamo Team (Mark Birger)- testing against quay.io noticed unexpected paging behavior from API. Need to review this and determine if we have a bug or is working as designed (and docs/common understanding needs changing).
From Slack:
Hey @Bill Dettelback, on a sync 2 weeks ago we agreed that I will provide a script that will reproduce Quay behaviour that we didn't expect. It is attached to the message.We reuse code from https://github.com/containerbuildsystem/atomic-reactor for registry auth, please run;
curl https://raw.githubusercontent.com/containerbuildsystem/atomic-reactor/1.6.41/atomic_reactor/auth.py
--output registry_auth.py
to download it next to the script.Script requires env variable QUAY_API_TOKEN with Quay API token (it is possible to reuse the one from Swagger) and CONTAINER_REGISTRY_API_AUTH_B64 token for Registry API. Run simply it with python3 reproducer.py . It is also required to update NAMESPACE and REPO global variables in the script to the one accessible by tokens.It will do the following: * query all repos in a namespace (to reproduce absence of pagination in a private organisation)
- query all tags in a repo (to reproduce unknown limit of tags in this response)
- query all tags with Container Registry API (to reproduce ignorace of paginated query, max 50 tags limit)
- query Quay API in multiple threads, configurable amount of queries, queries per second (reproduce unknown limit of queries per second from one IP)