gitlab-org--gitlab-foss/app/services/git
Patrick Bajao d96c24d815 Invalidate branches cache on PostReceive
Whenever `PostReceive` is enqueued, `UpdateMergeRequestsWorker`
is enqueued and `MergeRequests::RefreshService` is called, it'll
check if the source branch of each MR asssociated to the push exists
or not via `MergeRequest#source_branch_exists?`. The said method will
call `Repository#branch_exists?` which is cached in `Rails.cache`.

When the cache contains outdated data and the source branch actually
exists, the `MergeRequests#RefreshService` job will close associated
MRs which is not correct.

The fix is to expire the branches cache of the project so we have
updated data during the post receive hook which will help in the
accuracy of the check if we need to close associated MRs or not.
2019-08-09 18:09:06 +08:00
..
base_hooks_service.rb Fix remote mirrors not updating after tag push 2019-05-17 14:45:41 -07:00
branch_hooks_service.rb Invalidate branches cache on PostReceive 2019-08-09 18:09:06 +08:00
branch_push_service.rb Fix remote mirrors not updating after tag push 2019-05-17 14:45:41 -07:00
tag_hooks_service.rb Extract a Git::{Base,Tag,Branch}HooksService 2019-04-05 18:26:53 +01:00
tag_push_service.rb Extract a Git::{Base,Tag,Branch}HooksService 2019-04-05 18:26:53 +01:00
wiki_push_service.rb Backport of 12014-incremental-es-wiki-updates 2019-06-18 16:57:37 -06:00