Skip to content
代码片段 群组 项目
未验证 提交 0bbf4341 编辑于 作者: Terri Chu's avatar Terri Chu 提交者: GitLab
浏览文件

Mark 20240219161432 as obsolete

This migration marks the 20240219161432 IndexAllProjects Advanced search migration as obsolete.

[Search for references to `index_all_projects` in code](https://gitlab.com/search?project_id=278964&scope=blobs&search=index_all_projects&regex=false))

At the moment, the `gitlab-housekeeper` is not always capable of removing all references so
you must check the diff and pipeline failures to confirm if there are any issues.
It is the responsibility of the assignee (picked from ~"group::global search") to push those changes to this branch.

[Read more](https://docs.gitlab.com/ee/development/search/advanced_search_migration_styleguide.html#cleaning-up-advanced-search-migrations)
about the process for marking Advanced search migrations as obsolete.

All Advanced search migrations must have had at least one
[required stop](https : // docs.gitlab.com / ee / development / database / required_stops.html)
to process the migration. Therefore we mark any Advanced search migrations added before the
last required stop as obsolete.

This change was generated by
[gitlab-housekeeper](https://gitlab.com/gitlab-org/gitlab/-/tree/master/gems/gitlab-housekeeper)
using the Keeps::MarkOldAdvancedSearchMigrationsAsObsolete keep.

To provide feedback on your experience with `gitlab-housekeeper` please create an issue with the
label ~"GitLab Housekeeper" and consider pinging the author of this keep.

Changelog: other
EE: true
上级 22ab1376
No related branches found
No related tags found
无相关合并请求
......@@ -5,6 +5,6 @@ description: Index all the project documents
group: group::global search
milestone: '16.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/145131
obsolete: false
marked_obsolete_by_url:
marked_obsolete_in_milestone:
obsolete: true
marked_obsolete_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169312
marked_obsolete_in_milestone: '17.6'
......@@ -28,3 +28,5 @@ def space_required_bytes
0
end
end
IndexAllProjects.prepend ::Elastic::MigrationObsolete
......@@ -3,50 +3,6 @@
require 'spec_helper'
require File.expand_path('ee/elastic/migrate/20240219161432_index_all_projects.rb')
RSpec.describe IndexAllProjects, :elastic, feature_category: :global_search do
let(:version) { 20240219161432 }
it_behaves_like 'migration reindexes all data' do
let(:objects) { create_list(:project, 3) }
let(:expected_throttle_delay) { 1.minute }
let(:expected_batch_size) { 50_000 }
end
describe '#space_required_bytes' do
let(:helper) { ::Gitlab::Elastic::Helper.default }
let(:migration) { described_class.new(version) }
subject(:space_required_bytes) { migration.space_required_bytes }
context 'when elasticsearch_limit_indexing? is set to false' do
it { is_expected.to eq(0) }
end
context 'when elasticsearch_limit_indexing? is set to true' do
before do
stub_ee_application_setting(elasticsearch_limit_indexing: true)
allow(::Gitlab::Elastic::Helper).to receive(:default).and_return(helper)
end
it 'returns space required' do
expect(Project).to receive(:count).and_return(100)
expect(helper).to receive(:index_size_bytes)
.with(index_name: described_class::DOCUMENT_TYPE.index_name).and_return(1000)
expect(helper).to receive(:documents_count)
.with(index_name: described_class::DOCUMENT_TYPE.index_name).and_return(10)
expect(space_required_bytes).to eq(9000)
end
it 'returns 0 when no projects exist in index' do
expect(Project).to receive(:count).and_return(100)
expect(helper).to receive(:index_size_bytes)
.with(index_name: described_class::DOCUMENT_TYPE.index_name).and_return(1000)
expect(helper).to receive(:documents_count)
.with(index_name: described_class::DOCUMENT_TYPE.index_name).and_return(0)
expect(space_required_bytes).to eq(0)
end
end
end
RSpec.describe IndexAllProjects, feature_category: :global_search do
it_behaves_like 'a deprecated Advanced Search migration', 20240219161432
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册