Add offset/pagination support to SearchFilesByNameRequest
The SearchFilesByNameRequest RPC supports limit
parameter only. This is not a big concern currently because that RPC is not widely adopted (metrics). However, in gitlab#357651 (closed), we are planning to replace the whole Wiki service. SearchFilesByNameRequest would be exposed more after the change.
In that issue, we have an interest to iterate through a big list of pages. The pages are rendered on the frontend, but the pagination handling is done from Rails side, after fetching the full list of pages. Each page may also include the raw content of the underlying file. That's not performant. So, adding the offset parameter to the call is essential. We can also consider using PaginationParameter.
Availability & Testing
We should ensure that if the new offset/pagination fields are not provided, that we continue to return the same result set as today to avoid risking breaking any client which today expects to get 'all results' on this endpoint.
-
Update unit/integration tests in gitlab-org/gitaly to include the new fields -
Ensure the existence of a test that validates a 'large' result to validate that existing behaviour remains the default behaviour for now