History rewrite: handle Gitaly errors
What does this MR do and why?
Contributes to #483085 (closed)
Problem
There is no handling for Gitaly related errors. Because of that
RewriteHistoryService will raise an error instead of returning a
ServiceResponse object.
Solution
- Add Gitaly error handling for
#rewrite_historytoRepositoryCleanerclass - Use
RepositoryCleanerinRewriteHistoryServiceinstead of directly calling Gitaly client. - Add tests for Gitaly error handling.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Enable feature flag
Feature.enable(:async_rewrite_history) - Follow Remove blobs guidance
- Check latest emails: http://gdk.test:3000/rails/letter_opener
Edited by Vasilii Iakliushin