-
Notifications
You must be signed in to change notification settings - Fork 303
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
registry: Add ListManfiests and ListRepositoriesV2 api endpoint support + Token pagination #501
registry: Add ListManfiests and ListRepositoriesV2 api endpoint support + Token pagination #501
Conversation
…api-endpoint-support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks good to me, but I was thinking it should probably include some additional tests in links_test.go
and maybe godo_test.go
.
It would also be good to validate these new endpoints in our private e2e repo where we have at least one test for listing repositories and probably another for listing images by tag. To test the changes in this repo you would use go mod edit -replace
in your local copy of the e2e repo to point it at your local copy of this repo.
PerPage int `url:"per_page,omitempty"` | ||
|
||
// For paginated result sets which support tokens, the token provided by the last set | ||
// of results in order to retrieve the next set of results. This is expected to be faster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expected to be faster than incrementing or decrementing the page number.
Might be helpful here to link to a blog post or some other kind of documentation about how token-based pagination leads to more efficient database queries since it's not obvious at first glance why it would be faster. Then again, maybe because this is a public repo we don't need to worry about that kind of detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an implementation detail that I suspect may be different across teams and functions, so I'd rather keep it vague for now.
Agreed, not sure how I missed that. Added 👍🏻
That's also a good point. I've created CON-5667 to track that work independently. https://github.com/digitalocean/e2e/pull/228 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Just had some comments
8b44329
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
@andrewsomething Do you mind taking a look and merging? I'll follow this up with a version / changelog pr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Changes
I did go ahead and create a throwaway project to test these new methods and they work as expected. The token pagination also works well 👍🏻
Follow up
CON-3907