Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7b4e68ec
Commit
7b4e68ec
authored
Apr 06, 2021
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cached_api_merge_request_version FF
The FF has been enabled by default for a while Now we can remove it
parent
a7905879
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
25 deletions
+6
-25
changelogs/unreleased/id-remove-cached-api-ff.yml
changelogs/unreleased/id-remove-cached-api-ff.yml
+5
-0
config/feature_flags/development/cached_api_merge_request_version.yml
...re_flags/development/cached_api_merge_request_version.yml
+0
-8
lib/api/merge_request_diffs.rb
lib/api/merge_request_diffs.rb
+1
-5
spec/requests/api/merge_request_diffs_spec.rb
spec/requests/api/merge_request_diffs_spec.rb
+0
-12
No files found.
changelogs/unreleased/id-remove-cached-api-ff.yml
0 → 100644
View file @
7b4e68ec
---
title
:
Remove cached_api_merge_request_version feature flag
merge_request
:
58670
author
:
type
:
changed
config/feature_flags/development/cached_api_merge_request_version.yml
deleted
100644 → 0
View file @
a7905879
---
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
lib/api/merge_request_diffs.rb
View file @
7b4e68ec
...
@@ -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
...
...
spec/requests/api/merge_request_diffs_spec.rb
View file @
7b4e68ec
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment