From 1ad8278054048a29f683a75f117fe8480d9daab6 Mon Sep 17 00:00:00 2001 From: Terri Chu <tchu@gitlab.com> Date: Mon, 21 Oct 2024 16:23:35 +0000 Subject: [PATCH] Mark 20240123181031 as obsolete This migration marks the 20240123181031 ReindexIssueToUpdateAnalyzerForTitle Advanced search migration as obsolete. [Search for references to `reindex_issue_to_update_analyzer_for_title` in code](https://gitlab.com/search?project_id=278964&scope=blobs&search=reindex_issue_to_update_analyzer_for_title®ex=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 --- ...dex_issue_to_update_analyzer_for_title.yml | 9 ++++---- ...ndex_issue_to_update_analyzer_for_title.rb | 2 ++ ...issue_to_update_analyzer_for_title_spec.rb | 23 +------------------ 3 files changed, 8 insertions(+), 26 deletions(-) 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 4da20d22b722a..f91d34ae1ec95 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 374596c6cb8e9..4dbeef8884837 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 86dde4df9593b..1d601c0d4bdd3 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 -- GitLab