Skip to content

git: Fix removal of nonexistent repositories

What does this MR do and why?

Gitaly has changed semantics of the RemoveRepository RPC call to return an error in case the repository that is about to be deleted doesn't exist anymore in commit f328e3f70 (repository: Implement atomic locking semantics for RemoveRepository, 2021-11-30). This change was required such that Gitaly can provide proper locking semantics for repositories, but it has broken expectations on our side that removing a nonexisting repository is an idempotent action.

Adapt to the semantic change by rescuing from NoRepository errors in Repository#remove.

Replaces !76205 (closed).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading