Commit b39e3e74 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '207381-remove-es-web-indexing-ff' into 'master'

Remove the elasticsearch_web_indexing feature flag

Closes #207381

See merge request gitlab-org/gitlab!34945
parents 9552bbee ceaad325
# frozen_string_literal: true # frozen_string_literal: true
class Admin::ElasticsearchController < Admin::ApplicationController class Admin::ElasticsearchController < Admin::ApplicationController
before_action :check_elasticsearch_web_indexing_feature_flag!
def check_elasticsearch_web_indexing_feature_flag!
render_404 unless Feature.enabled?(:elasticsearch_web_indexing, default_enabled: true)
end
# POST # POST
# Scheduling indexing jobs # Scheduling indexing jobs
def enqueue_index def enqueue_index
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
- unless Gitlab::CurrentSettings.elasticsearch_indexing? - unless Gitlab::CurrentSettings.elasticsearch_indexing?
.form-text.text-muted .form-text.text-muted
= _('Please create an index before enabling indexing') = _('Please create an index before enabling indexing')
- if Feature.enabled?(:elasticsearch_web_indexing, default_enabled: true) && Gitlab::CurrentSettings.elasticsearch_indexing? - if Gitlab::CurrentSettings.elasticsearch_indexing?
.form-text .form-text
= link_to _('Index all projects'), admin_elasticsearch_enqueue_index_path, = link_to _('Index all projects'), admin_elasticsearch_enqueue_index_path,
class: ['btn', 'btn-success'], method: :post class: ['btn', 'btn-success'], method: :post
......
...@@ -36,17 +36,5 @@ RSpec.describe Admin::ElasticsearchController do ...@@ -36,17 +36,5 @@ RSpec.describe Admin::ElasticsearchController do
expect(response).to redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings') expect(response).to redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
end end
end end
context 'when feature is disabled' do
it 'does nothing and returns 404' do
stub_feature_flags(elasticsearch_web_indexing: false)
expect(::Elastic::IndexProjectsService).not_to receive(:new)
post :enqueue_index
expect(response).to have_gitlab_http_status(:not_found)
end
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment