Skip to content

Don't check repository existence when applying quarantine

Sami Hiltunen requested to merge smh-quarantine-dont-check-existence into master

The localrepo.Repo.Quarantine method is currently checking whether the repository exists. This is a side effect of calling Repo.Path(). When beginning a transaction, we want to set up a quarantine even if the repository is not valid or doesn't exist yet. Its left up to the RPC handler to decide what to do with an invalid repository to keep the existing behavior. To do so, stop checking the validity of the repository when applying a quarantine. It's not really a necessary check as applying the quarantine doesn't actually need to reach to the disk but purely overwrites the object directory values in the *gitalypb.Repository.

Merge request reports