Commit de3fa103 authored by Patrick Bajao's avatar Patrick Bajao

Enable merge requests discussions cache

This removes the merge_request_discussions_cache feature flag.

The feature flag has been enabled on production for a couple of
months now and performance improvements were seen and bugs were
fixed.

Changelog: changed
parent b52f21df
......@@ -158,7 +158,7 @@ module IssuableActions
discussions = Discussion.build_collection(notes, issuable)
if issuable.is_a?(MergeRequest) && Feature.enabled?(:merge_request_discussion_cache, issuable.target_project, default_enabled: :yaml)
if issuable.is_a?(MergeRequest)
cache_context = [current_user&.cache_key, project.team.human_max_access(current_user&.id)].join(':')
render_cached(discussions, with: discussion_serializer, cache_context: -> (_) { cache_context }, context: self)
......
---
name: merge_request_discussion_cache
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64688
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/335799
milestone: '14.1'
type: development
group: group::code review
default_enabled: false
......@@ -251,16 +251,6 @@ RSpec.describe 'merge requests discussions' do
let(:changed_notes) { [first_note, second_note] }
end
end
context 'when merge_request_discussion_cache is disabled' do
before do
stub_feature_flags(merge_request_discussion_cache: false)
end
it_behaves_like 'cache miss' do
let(:changed_notes) { [first_note, second_note] }
end
end
end
end
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