Skip to content

praefect: Support new locking semantics in RemoveRepository handler

In f328e3f7 (repository: Implement atomic locking semantics for RemoveRepository, 2021-11-30), we have introduced new locking semantics for the RemoveRepository RPC call. As a result, the RPC call now returns a NotFound error in case the repository that is about to be deleted doesn't exist, which was previously silently ignored. What was missed though was that we also had to change the RPC handler on Praefect's side, which intercepts this call. As a result, behaviour between Gitaly and Praefect is now inconsistent.

Fix this by also respecting the feature flag in Praefect and returning a NotFound error if the repository does not exist.

Changelog: fixed

Merge request reports