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
5cda9382
Commit
5cda9382
authored
Aug 27, 2020
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extracts_path_optimization feature flag
parent
875bbb8e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
15 deletions
+5
-15
changelogs/unreleased/remove-extracts-path-optimization-flag.yml
...ogs/unreleased/remove-extracts-path-optimization-flag.yml
+5
-0
lib/extracts_ref.rb
lib/extracts_ref.rb
+0
-1
spec/support/shared_examples/path_extraction_shared_examples.rb
...upport/shared_examples/path_extraction_shared_examples.rb
+0
-14
No files found.
changelogs/unreleased/remove-extracts-path-optimization-flag.yml
0 → 100644
View file @
5cda9382
---
title
:
Reduce Redis usage when viewing repositories with lots of branches and tags
merge_request
:
40615
author
:
type
:
performance
lib/extracts_ref.rb
View file @
5cda9382
...
...
@@ -111,7 +111,6 @@ module ExtractsRef
end
def
use_first_path_segment?
(
ref
)
return
false
unless
::
Feature
.
enabled?
(
:extracts_path_optimization
)
return
false
unless
repository_container
return
false
if
repository_container
.
repository
.
has_ambiguous_refs?
...
...
spec/support/shared_examples/path_extraction_shared_examples.rb
View file @
5cda9382
...
...
@@ -146,20 +146,6 @@ RSpec.shared_examples 'extracts refs' do
expect
(
extract_ref
(
'release/app/doc/README.md'
)).
to
eq
([
'release/app'
,
'doc/README.md'
])
end
context
'when the extracts_path_optimization feature flag is disabled'
do
before
do
stub_feature_flags
(
extracts_path_optimization:
false
)
end
it
'always fetches all ref names'
do
expect
(
self
).
to
receive
(
:ref_names
).
and_call_original
expect
(
container
.
repository
).
not_to
receive
(
:branch_names_include?
)
expect
(
container
.
repository
).
not_to
receive
(
:tag_names_include?
)
expect
(
extract_ref
(
'v1.0.0/doc/README.md'
)).
to
eq
([
'v1.0.0'
,
'doc/README.md'
])
end
end
end
context
'when the repository has ambiguous refs'
do
...
...
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