Migrate elastic search warning
What does this MR do and why?
Update ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
to leverage the shared alert HAML partial (app/views/shared/_global_alert.html.haml
).
Related to #354594 (closed)
Screenshots or screen recordings
No visual change
How to set up and validate locally
- Apply the following patch (it's the fastest way to emulate halted migration)
Click to expand
diff --git a/ee/app/services/elastic/data_migration_service.rb b/ee/app/services/elastic/data_migration_service.rb
index 718f3c3f325..07d1f6a29b9 100644
--- a/ee/app/services/elastic/data_migration_service.rb
+++ b/ee/app/services/elastic/data_migration_service.rb
@@ -81,12 +81,14 @@ def pending_migrations
end
def halted_migrations?
+ return true
migrations.reverse.any? do |migration|
migration_halted?(migration)
end
end
def halted_migration
+ return migrations.first
migrations.reverse.find do |migration|
migration_halted?(migration)
end
diff --git a/ee/app/views/admin/application_settings/_elasticsearch_form.html.haml b/ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
index da32afb9a74..a90a02f485d 100644
--- a/ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
+++ b/ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
@@ -1,7 +1,7 @@
- return unless License.feature_available?(:elastic_search)
- elastic_helper = Gitlab::Elastic::Helper.default
-- elasticsearch_available = elastic_helper.ping?
+- elasticsearch_available = true
%section.settings.as-elasticsearch.no-animate#js-elasticsearch-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'elasticsearch_tab' } }
.settings-header
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Diana Zubova