gitlab-org--gitlab-foss/app/services/merge_requests
Yorick Peterse 57b96eb6db
Fix refreshing of issues/MR count caches
This ensures the open issues/MR count caches are refreshed properly when
creating new issues or MRs. This MR also includes a change to the cache
keys to ensure all caches are rebuilt on the fly.

This particular problem was not caught in the test suite due to a null
cache being used, resulting in all calls that would use a cache using
the underlying data directly. In production the code would fail because
a newly saved record returns an empty hash in #changes meaning checks
such as `state_changed? || confidential_changed?` would return false for
new rows, thus never updating the counters.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38061
2017-09-19 17:16:45 +02:00
..
conflicts Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
add_todo_when_build_fails_service.rb Make it possible to resolve all todos for pipeline 2017-02-15 10:54:33 +01:00
assign_issues_service.rb Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
base_service.rb Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
build_service.rb Fix 404 when upstream has disabled merge requests 2017-04-27 01:04:07 +03:00
close_service.rb Fix refreshing of issues/MR count caches 2017-09-19 17:16:45 +02:00
create_from_issue_service.rb Make RuboCop happy 2017-08-21 14:30:37 +01:00
create_service.rb Detect n+1 issues involving Gitaly 2017-09-19 10:55:37 +00:00
get_urls_service.rb Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
merge_request_diff_cache_service.rb switch from diff_file_collection to diffs 2016-08-03 07:00:20 +02:00
merge_service.rb Prepare Repository#merge for migration to Gitaly 2017-09-15 16:39:20 +02:00
merge_when_pipeline_succeeds_service.rb Rename MergeRequest#async_merge to merge_async 2017-08-28 15:55:25 -03:00
post_merge_service.rb Clear issuable counter caches on update 2017-07-19 10:21:20 +01:00
refresh_service.rb Don't mark empty MRs as merged on push to the target branch 2017-07-07 15:34:33 +01:00
reopen_service.rb Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
resolved_discussion_notification_service.rb Address review feedback 2016-08-16 11:04:26 -05:00
update_service.rb Rename MergeRequest#async_merge to merge_async 2017-08-28 15:55:25 -03:00