Commit 0edeebf8 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'id-remove-cached-api-ff' into 'master'

Remove cached_api_merge_request_version FF [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!58670
parents 095c25f4 7b4e68ec
---
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 ...@@ -45,11 +45,7 @@ module API
merge_request = find_merge_request_with_access(params[:merge_request_iid]) 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
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
end end
end end
end end
......
...@@ -82,18 +82,6 @@ RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs' do ...@@ -82,18 +82,6 @@ RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs' do
expect(Rails.cache.fetch(merge_request_diff.cache_key)).to be_present expect(Rails.cache.fetch(merge_request_diff.cache_key)).to be_present
end 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 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