Commit c6c02b88 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'remove-extracts-path-optimization-flag' into 'master'

Remove extracts_path_optimization feature flag

See merge request gitlab-org/gitlab!40615
parents 54655349 5cda9382
---
title: Reduce Redis usage when viewing repositories with lots of branches and tags
merge_request: 40615
author:
type: performance
......@@ -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?
......
......@@ -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
......
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