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
22e2f405
Commit
22e2f405
authored
Sep 08, 2020
by
gaga5lala
Committed by
Heinrich Lee Yu
Sep 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove attempt_project_search_optimizations feature flag
parent
54ce99b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
27 deletions
+13
-27
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+1
-2
changelogs/unreleased/gaga5lala-remove-feature-flag.yml
changelogs/unreleased/gaga5lala-remove-feature-flag.yml
+5
-0
spec/finders/issues_finder_spec.rb
spec/finders/issues_finder_spec.rb
+7
-21
spec/support/shared_examples/controllers/issuables_list_metadata_shared_examples.rb
...es/controllers/issuables_list_metadata_shared_examples.rb
+0
-4
No files found.
app/finders/issuable_finder.rb
View file @
22e2f405
...
...
@@ -234,8 +234,7 @@ class IssuableFinder
end
def
attempt_project_search_optimizations?
params
[
:attempt_project_search_optimizations
]
&&
Feature
.
enabled?
(
:attempt_project_search_optimizations
,
default_enabled:
true
)
params
[
:attempt_project_search_optimizations
]
end
def
count_key
(
value
)
...
...
changelogs/unreleased/gaga5lala-remove-feature-flag.yml
0 → 100644
View file @
22e2f405
---
title
:
Remove attempt_project_search_optimizations feature flag
merge_request
:
41550
author
:
gaga5lala
type
:
other
spec/finders/issues_finder_spec.rb
View file @
22e2f405
...
...
@@ -1004,36 +1004,22 @@ RSpec.describe IssuesFinder do
end
end
context
'when attempt_group_search_optimizations is unset and attempt_project_search_optimizations is set'
do
let
(
:params
)
{
{
search:
'foo'
,
attempt_project_search_optimizations:
true
}
}
context
'and the corresponding feature flag is disabled'
do
before
do
stub_feature_flags
(
attempt_project_search_optimizations:
false
)
end
context
'when all conditions are met'
do
context
"uses group search optimization"
do
let
(
:params
)
{
{
search:
'foo'
,
attempt_group_search_optimizations:
true
}
}
it
'returns
fals
e'
do
expect
(
finder
.
use_cte_for_search?
).
to
be_
false
y
it
'returns
tru
e'
do
expect
(
finder
.
use_cte_for_search?
).
to
be_
truth
y
end
end
context
'and the corresponding feature flag is enabled'
do
before
do
stub_feature_flags
(
attempt_project_search_optimizations:
true
)
end
context
"uses project search optimization"
do
let
(
:params
)
{
{
search:
'foo'
,
attempt_project_search_optimizations:
true
}
}
it
'returns true'
do
expect
(
finder
.
use_cte_for_search?
).
to
be_truthy
end
end
end
context
'when all conditions are met'
do
let
(
:params
)
{
{
search:
'foo'
,
attempt_group_search_optimizations:
true
}
}
it
'returns true'
do
expect
(
finder
.
use_cte_for_search?
).
to
be_truthy
end
end
end
end
spec/support/shared_examples/controllers/issuables_list_metadata_shared_examples.rb
View file @
22e2f405
...
...
@@ -42,10 +42,6 @@ RSpec.shared_examples 'issuables list meta-data' do |issuable_type, action = nil
let
(
:result_issuable
)
{
issuables
.
first
}
let
(
:search
)
{
result_issuable
.
title
}
before
do
stub_feature_flags
(
attempt_project_search_optimizations:
true
)
end
# .simple_sorts is the same across all Sortable classes
sorts
=
::
Issue
.
simple_sorts
.
keys
+
%w[popularity priority label_priority]
sorts
.
each
do
|
sort
|
...
...
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