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
add_todo_when_build_fails_service.rb
assign_issues_service.rb
base_service.rb
build_service.rb
close_service.rb Fix refreshing of issues/MR count caches 2017-09-19 17:16:45 +02:00
create_from_issue_service.rb
create_service.rb
get_urls_service.rb
merge_request_diff_cache_service.rb
merge_service.rb
merge_when_pipeline_succeeds_service.rb
post_merge_service.rb
refresh_service.rb
reopen_service.rb
resolved_discussion_notification_service.rb
update_service.rb