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
08db5e12
Commit
08db5e12
authored
Mar 30, 2021
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove merge_request_cached_pipeline_serializer FF
The FF has been enabled by default for a while Let's remove it
parent
bbe3dfc3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
38 deletions
+6
-38
app/serializers/merge_request_poll_cached_widget_entity.rb
app/serializers/merge_request_poll_cached_widget_entity.rb
+1
-3
app/serializers/merge_request_poll_widget_entity.rb
app/serializers/merge_request_poll_widget_entity.rb
+0
-6
changelogs/unreleased/id-remove-cached-pipeline-serializer-ff.yml
...gs/unreleased/id-remove-cached-pipeline-serializer-ff.yml
+5
-0
config/feature_flags/development/merge_request_cached_pipeline_serializer.yml
.../development/merge_request_cached_pipeline_serializer.yml
+0
-8
spec/serializers/merge_request_poll_cached_widget_entity_spec.rb
...rializers/merge_request_poll_cached_widget_entity_spec.rb
+0
-8
spec/serializers/merge_request_poll_widget_entity_spec.rb
spec/serializers/merge_request_poll_widget_entity_spec.rb
+0
-13
No files found.
app/serializers/merge_request_poll_cached_widget_entity.rb
View file @
08db5e12
...
...
@@ -46,9 +46,7 @@ class MergeRequestPollCachedWidgetEntity < IssuableEntity
end
end
expose
:actual_head_pipeline
,
as: :pipeline
,
if:
->
(
mr
,
_
)
{
Feature
.
enabled?
(
:merge_request_cached_pipeline_serializer
,
mr
.
project
)
&&
presenter
(
mr
).
can_read_pipeline?
}
do
|
merge_request
,
options
|
expose
:actual_head_pipeline
,
as: :pipeline
,
if:
->
(
mr
,
_
)
{
presenter
(
mr
).
can_read_pipeline?
}
do
|
merge_request
,
options
|
MergeRequests
::
PipelineEntity
.
represent
(
merge_request
.
actual_head_pipeline
,
options
)
end
...
...
app/serializers/merge_request_poll_widget_entity.rb
View file @
08db5e12
...
...
@@ -19,12 +19,6 @@ class MergeRequestPollWidgetEntity < Grape::Entity
# User entities
expose
:merge_user
,
using:
UserEntity
expose
:actual_head_pipeline
,
as: :pipeline
,
if:
->
(
mr
,
_
)
{
Feature
.
disabled?
(
:merge_request_cached_pipeline_serializer
,
mr
.
project
)
&&
presenter
(
mr
).
can_read_pipeline?
}
do
|
merge_request
,
options
|
MergeRequests
::
PipelineEntity
.
represent
(
merge_request
.
actual_head_pipeline
,
options
)
end
expose
:merge_pipeline
,
if:
->
(
mr
,
_
)
{
mr
.
merged?
&&
can?
(
request
.
current_user
,
:read_pipeline
,
mr
.
target_project
)}
do
|
merge_request
,
options
|
MergeRequests
::
PipelineEntity
.
represent
(
merge_request
.
merge_pipeline
,
options
)
end
...
...
changelogs/unreleased/id-remove-cached-pipeline-serializer-ff.yml
0 → 100644
View file @
08db5e12
---
title
:
Move pipelines calculation from widget.json to cached_widget.json
merge_request
:
57822
author
:
type
:
performance
config/feature_flags/development/merge_request_cached_pipeline_serializer.yml
deleted
100644 → 0
View file @
bbe3dfc3
---
name
:
merge_request_cached_pipeline_serializer
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38273
rollout_issue_url
:
milestone
:
'
13.5'
type
:
development
group
:
group::code review
default_enabled
:
false
spec/serializers/merge_request_poll_cached_widget_entity_spec.rb
View file @
08db5e12
...
...
@@ -248,14 +248,6 @@ RSpec.describe MergeRequestPollCachedWidgetEntity do
expect
(
subject
[
:pipeline
]).
to
eq
(
pipeline_payload
)
end
context
'when merge_request_cached_pipeline_serializer is disabled'
do
it
'does not return pipeline'
do
stub_feature_flags
(
merge_request_cached_pipeline_serializer:
false
)
expect
(
subject
[
:pipeline
]).
to
be_nil
end
end
end
context
'when user does not have access to pipelines'
do
...
...
spec/serializers/merge_request_poll_widget_entity_spec.rb
View file @
08db5e12
...
...
@@ -226,19 +226,6 @@ RSpec.describe MergeRequestPollWidgetEntity do
expect
(
subject
[
:pipeline
]).
to
be_nil
end
context
'when merge_request_cached_pipeline_serializer is disabled'
do
it
'returns detailed info about pipeline'
do
stub_feature_flags
(
merge_request_cached_pipeline_serializer:
false
)
pipeline_payload
=
MergeRequests
::
PipelineEntity
.
represent
(
pipeline
,
request:
req
)
.
as_json
expect
(
subject
[
:pipeline
]).
to
eq
(
pipeline_payload
)
end
end
it
'returns ci_status'
do
expect
(
subject
[
:ci_status
]).
to
eq
(
'pending'
)
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