Skip to content
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

Handle Paging in clients #59

Open
JoshVanL opened this issue Nov 11, 2020 · 1 comment
Open

Handle Paging in clients #59

JoshVanL opened this issue Nov 11, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@JoshVanL
Copy link
Contributor

We do not currently properly support paging in clients. This means that tag sets will only include tags which are returned in the first page from the registry. This may lead to incorrect results when reporting the latest image when options have been applied.

We should update our clients to implement proper HTTP paging, to ensure we get the fill list of tag results.

@badrul-devops
Copy link

Implementing proper HTTP paging in clients is important to ensure that we get the full list of tag results and avoid incorrect results when reporting the latest image with applied options.

Here are the steps you can take to implement proper HTTP paging in clients:

Determine the API endpoint for fetching tags from the registry. This may vary depending on the registry and the API being used.

Review the API documentation to understand how paging is implemented. Typically, paging is done using query parameters such as "page" and "per_page", or using pagination links in the response headers.

Modify your client to make multiple requests to the API, each time including the appropriate paging parameters. You can use a loop or recursion to make the requests until all pages have been retrieved.

Combine the results from all pages into a single list of tags. You may need to handle duplicates or sort the results depending on your requirements.

Test your implementation thoroughly to ensure it works correctly with different registries, APIs, and paging parameters.

By implementing proper HTTP paging in your clients, you can ensure that you get accurate and complete results when fetching tags from the registry.

@davidcollom davidcollom added enhancement New feature or request help wanted Extra attention is needed labels Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants