Commit 7b4e68ec authored by Igor Drozdov's avatar Igor Drozdov

Remove cached_api_merge_request_version FF

The FF has been enabled by default for a while
Now we can remove it
parent a7905879
---
title: Remove cached_api_merge_request_version feature flag
merge_request: 58670
author:
type: changed
---
name: cached_api_merge_request_version
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57568
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326093
milestone: '13.11'
type: development
group: group::source code
default_enabled: true
......@@ -45,11 +45,7 @@ module API
merge_request = find_merge_request_with_access(params[:merge_request_iid])
if Feature.enabled?(:cached_api_merge_request_version, default_enabled: :yaml)
present_cached merge_request.merge_request_diffs.find(params[:version_id]), with: Entities::MergeRequestDiffFull, cache_context: nil
else
present merge_request.merge_request_diffs.find(params[:version_id]), with: Entities::MergeRequestDiffFull
end
present_cached merge_request.merge_request_diffs.find(params[:version_id]), with: Entities::MergeRequestDiffFull, cache_context: nil
end
end
end
......
......@@ -82,18 +82,6 @@ RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs' do
expect(Rails.cache.fetch(merge_request_diff.cache_key)).to be_present
end
context 'when cached_api_merge_request_version is disabled' do
before do
stub_feature_flags(cached_api_merge_request_version: false)
end
it 'is not performed' do
get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/versions/#{merge_request_diff.id}", user)
expect(Rails.cache.fetch(merge_request_diff.cache_key)).to be_nil
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