Restore TagsFinder class interface
What does this MR do and why?
Contributes to #299529 (closed)
Problem
TagsFinder
interface is not compatible with other Finders (like
BranchesFinder
, Repositories::TreeFinder
). It prevents us from using a
keyset pagination classes.
Solution
Changes:
- Restore
TagsFinder
interface to return a list of tags. - Raise an exception when Gitaly is not available
- Handle Gitaly exceptions
- Return 503 error for tags API endpoint when Gitaly is unavailable
Screenshots or screen recordings
Tags page
Tags API response
How to set up and validate locally
Tags page
- Go to tags page: http://localhost:3000/root/<project_path>/-/tags
- Stop Gitaly process in console
gdk stop gitaly
- Refresh the page
- Verify that the page loads and shows an error message
Tags API
- Send a request to tags API endpoint: http://localhost:3000/api/v4/projects/1/repository/tags
- Stop Gitaly process in console
gdk stop gitaly
- Resend the request
- Verify that response code is 503 and error message is "503 Service Unavailable"
Numbered steps to set up and validate the change are strongly suggested.
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