diff --git a/ee/elastic/docs/20240123181031_reindex_issue_to_update_analyzer_for_title.yml b/ee/elastic/docs/20240123181031_reindex_issue_to_update_analyzer_for_title.yml index 4da20d22b722a06d35421fa7b8df8e8ac14ed8bf..f91d34ae1ec9521be58b292be90f90231891ddb8 100644 --- a/ee/elastic/docs/20240123181031_reindex_issue_to_update_analyzer_for_title.yml +++ b/ee/elastic/docs/20240123181031_reindex_issue_to_update_analyzer_for_title.yml @@ -1,10 +1,11 @@ --- name: ReindexIssueToUpdateAnalyzerForTitle version: '20240123181031' -description: This migration reindexes the issues index to start using new analyzer for title +description: This migration reindexes the issues index to start using new analyzer + for title group: group::global search milestone: '16.9' introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/142580 -obsolete: false -marked_obsolete_by_url: -marked_obsolete_in_milestone: +obsolete: true +marked_obsolete_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169300 +marked_obsolete_in_milestone: '17.6' diff --git a/ee/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title.rb b/ee/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title.rb index 374596c6cb8e9f89733387837a7a028c15b52d18..4dbeef88848372252becc223a62401da531aeed6 100644 --- a/ee/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title.rb +++ b/ee/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title.rb @@ -9,3 +9,5 @@ def completed? true end end + +ReindexIssueToUpdateAnalyzerForTitle.prepend ::Elastic::MigrationObsolete diff --git a/ee/spec/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title_spec.rb b/ee/spec/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title_spec.rb index 86dde4df9593b87c1eaebfaa8fb0cec884d288f2..1d601c0d4bdd35ec824f06a4e91beb201d1cf893 100644 --- a/ee/spec/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title_spec.rb +++ b/ee/spec/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title_spec.rb @@ -4,26 +4,5 @@ require File.expand_path('ee/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title.rb') RSpec.describe ReindexIssueToUpdateAnalyzerForTitle, feature_category: :global_search do - let(:version) { 20240123181031 } - let(:migration) { described_class.new(version) } - - it 'does not have migration options set', :aggregate_failures do - expect(migration).not_to be_batched - expect(migration).not_to be_retry_on_failure - end - - describe '#migrate' do - it 'creates reindexing task with correct target and options' do - expect { migration.migrate }.to change { Elastic::ReindexingTask.count }.by(1) - task = Elastic::ReindexingTask.last - expect(task.targets).to eq(%w[Issue]) - expect(task.options).to eq({ 'skip_pending_migrations_check' => true }) - end - end - - describe '#completed?' do - it 'always returns true' do - expect(migration.completed?).to eq(true) - end - end + it_behaves_like 'a deprecated Advanced Search migration', 20240123181031 end