Commit bbb4a2ae authored by Pavel Shutsin's avatar Pavel Shutsin

Merge branch 'id-remve-find-tag-via-gitaly-ff' into 'master'

Remove find_tag_via_gitaly feature flag

See merge request gitlab-org/gitlab!77303
parents 375bc2ad cf9515de
...@@ -191,7 +191,7 @@ class Repository ...@@ -191,7 +191,7 @@ class Repository
end end
def find_tag(name) def find_tag(name)
if @tags.blank? && Feature.enabled?(:find_tag_via_gitaly, project, default_enabled: :yaml) if @tags.blank?
raw_repository.find_tag(name) raw_repository.find_tag(name)
else else
tags.find { |tag| tag.name == name } tags.find { |tag| tag.name == name }
......
---
name: find_tag_via_gitaly
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70181
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/340899
milestone: '14.3'
type: development
group: group::source code
default_enabled: true
...@@ -2398,17 +2398,6 @@ RSpec.describe Repository do ...@@ -2398,17 +2398,6 @@ RSpec.describe Repository do
it 'returns nil when tag does not exists' do it 'returns nil when tag does not exists' do
expect(repository.find_tag('does-not-exist')).to be_nil expect(repository.find_tag('does-not-exist')).to be_nil
end end
context 'when find_tag_via_gitaly is disabled' do
it 'fetches all tags' do
stub_feature_flags(find_tag_via_gitaly: false)
expect(Gitlab::GitalyClient)
.to receive(:call).with(anything, :ref_service, :find_all_tags, anything, anything).and_call_original
expect(repository.find_tag('v1.1.0').name).to eq('v1.1.0')
end
end
end end
describe '#avatar' do describe '#avatar' 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