Add keyset pagination for tags API
What does this MR do and why?
It adds a keyset pagination to Tags API. Additionally it applies a Gitaly pagination to the first page of the results. It should improve the performance of the endpoint when no arguments are provided.
Screenshots or screen recordings
How to set up and validate locally
Feature.enable(:tag_list_keyset_pagination)
- Find repository with tags
- Send a request to:
http://localhost:3000/api/v4/projects/<project_id>/repository/tags
- Send another request to:
http://localhost:3000/api/v4/projects/<project_id>/repository/tags?pagination=keyset&page_token=<tag_name>
, where tag_name is a tag from the first request. - Verify that you see elements that go after the page token
For example, you have a repository with following tags:
aaa
bbb
ccc
ddd
Then the request to http://localhost:3000/api/v4/projects/<project_id>/repository/tags?pagination=keyset&page_token=bbb
should return
ccc
ddd
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin