-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up a new test scenario for check pull limit-rate usage #1155
Comments
We may also consider writing our custom server (a new dummy pytest fixture: https://github.com/pulp/pulp-smash/blob/ca6c35d1455f39e5e8a618bc7833624f9d7d5983/pulp_smash/pulp3/pytest_plugin/__init__.py#L196-L203, https://github.com/pulp/pulp_file/blob/3daf462fef83375c14680d71a94d816a5fcadea6/pulp_file/tests/functional/conftest.py#L299) that will act like a registry (returning pre-defined responses) - just to see whether we are sending more GET requests or not after syncing the content. I was thinking about first syncing the content from a real registry, then updating the remote to start pointing to the dummy fixture and then we can initiate a new sync task. Probably too complicated? |
Thanks for filing this test issue. The goal is to automate those steps and tranform them into a test. Steps look good, I made minor adjustments. @lubosmj I believe it would be best to create such a fixture but it is not as simple as creating a dummy server, docker registry has it's own api with endpoints and response headers |
@decko did you happen to perform those steps to ensure the PR you've got merged into master works as you expect? :) |
Checking the rate-limit consume before and after the fix for #1047.The fix was to prevent the usage of methods that could consume the Registry rate-limit when it is not needed, in situations like where we already have the latest manifest or blobs. Test methodologyThe idea is to check the usage of Steps
ConclusionAfter applying the fix for #1047, any |
|
We can open a ticket for that. However, it might be cumbersome to groom the ticket at the moment. From the dummy server's perspective, we want to see that Pulp is not trying to download already synced manifests when we serve existing digests. The existing digests will be shared with the server via tests. |
This is not something we care about right now. |
Since we were working on the #1133 we noticed that having a functional test wouldn't have been the best way to test it.
So, we're opening this task to set up a manual test to check if after we sync a repo for a second time it would pull the remote again, consuming the pull limit-rate of the Docker registry.
Steps:
1 - Setup a repo and a remote pointing to Docker Registry
2 - Sync it
3 - Use the Docker API to check the Pull Rate Limit (docs here)
4 - Try to sync it again
5 - Check the Docker API again to see if the
ratelimit-remaining
decreased since the last time. It should not change after 2nd sync.Useful links:
1 - https://docs.docker.com/docker-hub/download-rate-limit/
The text was updated successfully, but these errors were encountered: