Skip to content
代码片段 群组 项目
提交 7a33f078 编辑于 作者: Dmitry Gruzd's avatar Dmitry Gruzd
浏览文件

Merge branch '417112-remove-ff-zoekt-inde-private-repositories' into 'master'

Remove FF zoekt_index_private_repositories

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135975



Merged-by: default avatarDmitry Gruzd <dgruzd@gitlab.com>
Approved-by: default avatarDmitry Gruzd <dgruzd@gitlab.com>
Co-authored-by: default avatarChangzheng Liu <cliu@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -946,24 +946,14 @@ def after_import ...@@ -946,24 +946,14 @@ def after_import
def use_zoekt? def use_zoekt?
# TODO: rename to index_code_with_zoekt? # TODO: rename to index_code_with_zoekt?
# https://gitlab.com/gitlab-org/gitlab/-/issues/421613 # https://gitlab.com/gitlab-org/gitlab/-/issues/421613
return false unless zoekt_indexable?
::Zoekt::IndexedNamespace.enabled_for_project?(self) ::Zoekt::IndexedNamespace.enabled_for_project?(self)
end end
def search_code_with_zoekt? def search_code_with_zoekt?
return false unless zoekt_indexable?
::Zoekt::IndexedNamespace.search_enabled_for_project?(self) ::Zoekt::IndexedNamespace.search_enabled_for_project?(self)
end end
def zoekt_indexable?
return true if self.public? && self.repository_access_level > ::ProjectFeature::PRIVATE
return true if ::Feature.enabled?(:zoekt_index_private_repositories)
false
end
def elastic_namespace_ancestry def elastic_namespace_ancestry
namespace.elastic_namespace_ancestry + "p#{id}-" namespace.elastic_namespace_ancestry + "p#{id}-"
end end
......
---
name: zoekt_index_private_repositories
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125511
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/417112
milestone: '16.2'
type: development
group: group::global search
default_enabled: true
...@@ -25,12 +25,6 @@ ...@@ -25,12 +25,6 @@
expect(unindexed_repository.use_zoekt?).to eq(false) expect(unindexed_repository.use_zoekt?).to eq(false)
end end
it 'is false for private projects when zoekt_index_private_repositories is disabled' do
stub_feature_flags(zoekt_index_private_repositories: false)
expect(private_repository.use_zoekt?).to eq(false)
end
it 'is true for private projects with new indexer' do it 'is true for private projects with new indexer' do
expect(private_repository.use_zoekt?).to eq(true) expect(private_repository.use_zoekt?).to eq(true)
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册