Commit 0b38dbe3 authored by Yorick Peterse's avatar Yorick Peterse Committed by Rémy Coutable

Merge branch 'reorder-project-expire-cache' into 'master'

Expire the exists cache before deletion to ensure project dir actually exists

See merge request !3413
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 6ef1adc7
......@@ -44,7 +44,8 @@ v 8.7.0 (unreleased)
- API: User can leave a project through the API when not master or owner. !3613
v 8.6.6
- Fix error on language detection when repository has no HEAD (e.g., master branch). !3654 (Jeroen Bobbeldijk)
- Expire the exists cache before deletion to ensure project dir actually exists (Stan Hu). !3413
- Fix error on language detection when repository has no HEAD (e.g., master branch) (Jeroen Bobbeldijk). !3654
v 8.6.5
- Fix importing from GitHub Enterprise. !3529
......
......@@ -335,6 +335,8 @@ class Repository
# Runs code just before a repository is deleted.
def before_delete
expire_exists_cache
expire_cache if exists?
expire_root_ref_cache
......
......@@ -558,7 +558,7 @@ describe Repository, models: true do
end
it 'flushes the exists cache' do
expect(repository).to receive(:expire_exists_cache)
expect(repository).to receive(:expire_exists_cache).twice
repository.before_delete
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment