#2989 Remove repo from gitolite cache when it gets deleted
Merged by pingou. Opened by bkabrda.
bkabrda/pagure gitolite-remove-from-cache  into  master

Download 2989.patch

The docstring for _remove_from_gitolite_cache describes purpose of this PR, I'll just paste it here for convenience:

Gitolite has no notion of "deleting" a project and it can only add values to gl-conf.cache. Therefore we must manually wipe all entries related to a project when deleting it. If this method is not executed and if someone creates a project with the same fullname again then its gl-conf file won't get created (see link to commit below) and any subsequent invocation of gitolite trigger POST_COMPILE will fail, thus preventing creation of new repos/forks at the whole pagure instance.

See https://github.com/sitaramc/gitolite/commit/41b7885b77cfe992ad3c96d0b021ece51ce1b3e3 (later reverted upstream, but still used in most Pagure deployments).

Looks good to me, let's rebase and merge (I'll run the tests in the mean time)

rebased onto ae01752ead33de3f5cd311924794ad4dbaadfb14

Thanks for reviewing. Rebased.

Btw, this msg variable seems to not be used anywhere, expected?

Ugh, that was supposed to be passed to the exception. Good catch, let me fix this.

rebased onto 42a2c11bd8c844a233a2c10f8d014ff21c33e517

Tests all passed, thanks! :)

Pull-Request has been merged by pingou

Metadata