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

Mark 20230719211400 as obsolete

This migration marks the 20230719211400 AddArchivedToWikis Advanced search migration as obsolete.

[Search for references to `add_archived_to_wikis` in code](https://gitlab.com/search?project_id=278964&scope=blobs&search=add_archived_to_wikis&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#deleting-advanced-search-migrations-in-a-major-version-upgrade)
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
上级 a8623cda
No related branches found
No related tags found
无相关合并请求
......@@ -5,6 +5,6 @@ description: Adds the boolean archived field on wikis index
group: group::global search
milestone: '16.3'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/126157
obsolete: false
marked_obsolete_by_url:
marked_obsolete_in_milestone:
obsolete: true
marked_obsolete_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/159448
marked_obsolete_in_milestone: '17.3'
......@@ -13,3 +13,5 @@ def new_mappings
{ archived: { type: 'boolean' } }
end
end
AddArchivedToWikis.prepend ::Elastic::MigrationObsolete
......@@ -186,7 +186,7 @@ def build_command(base_sha, to_sha)
def build_wiki_specific_flags
%W[--blob-type=wiki_blob --skip-commits --wiki-access-level=#{container.wiki_access_level}].tap do |c|
c << "--archived=#{project.archived}" if project && migration_finished?(:add_archived_to_wikis)
c << "--archived=#{project.archived}" if project
c << "--schema-version-wiki=#{WIKI_SCHEMA_VERSION}"
end
end
......
......@@ -3,8 +3,6 @@
require 'spec_helper'
require File.expand_path('ee/elastic/migrate/20230719211400_add_archived_to_wikis.rb')
RSpec.describe AddArchivedToWikis, :elastic, :sidekiq_inline, feature_category: :global_search do
let(:version) { 20230719211400 }
include_examples 'migration adds mapping'
RSpec.describe AddArchivedToWikis, feature_category: :global_search do
it_behaves_like 'a deprecated Advanced Search migration', 20230719211400
end
......@@ -405,46 +405,6 @@ def indexed_commits_for(term)
expect(indexed_wiki_paths_for('23')).not_to include('23.md')
end
end
context 'when add_archived_to_wikis migration is not completed' do
before do
set_elasticsearch_migration_to(:add_archived_to_wikis, including: false)
end
it 'runs the indexer without --archived flag' do
gitaly_connection_data = {
storage: project.repository_storage,
limit_file_size: Gitlab::CurrentSettings.elasticsearch_indexed_file_size_limit_kb.kilobytes
}.merge(Gitlab::GitalyClient.connection_data(project.repository_storage))
expect_popen.with(
[
TestEnv.indexer_bin_path,
"--timeout=#{described_class::TIMEOUT}s",
"--visibility-level=#{project.visibility_level}",
"--project-id=#{project.id}",
'--search-curation',
"--from-sha=#{expected_from_sha}",
"--to-sha=#{to_sha}",
"--full-path=#{project.full_path}",
'--blob-type=wiki_blob',
'--skip-commits',
"--wiki-access-level=#{project.wiki_access_level}",
"--schema-version-wiki=#{described_class::WIKI_SCHEMA_VERSION}",
"--traversal-ids=#{project.namespace_ancestry}",
"#{project.wiki.repository.disk_path}.git"
],
nil,
hash_including(
'GITALY_CONNECTION_INFO' => gitaly_connection_data.to_json,
'ELASTIC_CONNECTION_INFO' => elasticsearch_config.to_json,
'RAILS_ENV' => Rails.env,
'CORRELATION_ID' => Labkit::Correlation::CorrelationId.current_id
)
).and_return(popen_success)
indexer.run
end
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册