Remove duplicated ES administration Rake tasks
Summary
This is a follow-up to !17230 (closed) / !18254 (merged). Please resolve before merging !17230 (closed) into master
With the introduction of the new ES admin UI and the corresponding API, the Rake tasks become outdated or are obsolete.
I don't think there's much use in maintaining most of the old gitlab:elastic:* Rake tasks:
gitlab:elastic:indexgitlab:elastic:index_projects-
gitlab:elastic:create_empty_index/gitlab:elastic:recreate_index gitlab:elastic:delete_index
These were kept in !18254 (merged) for the moment because our QA test suite uses them to setup the ES index, but this could be replaced with calls to the API.
The tasks are also not very suitable for multi indices management. For example, create_empty_index and delete_index ideally are more applicable as a single-index operation, rather than multi-indices operation, but the rake tasks right now would affect all indices.
Other follow-up issues fill in the missing functionality provided by other Rake tasks:
-
gitlab:elastic:index_projects_status: #38124 -
gitlab:elastic:projects_not_indexed: #14621 (closed) -
gitlab:elastic:index_snippets: #13641 (closed) -
gitlab:elastic:create_empty_index,gitlab:elastic:clear_index_status: #11206
Some special-purpose tasks could be kept/removed, or implemented in the UI/API as well:
gitlab:elastic:clear_locked_projectsgitlab:elastic:test:index_sizegitlab:elastic:test:index_size_change
Improvements
Remove the Rake tasks that are duplicated in functionality.
Risks
Users might prefer having Rake tasks for some tasks, this would need to be determined.
If we want to keep the creation/deletion tasks, we'd need to extend them to properly support multiple indices.
Involved components
ee/lib/tasks/gitlab/elastic.rakeee/lib/tasks/gitlab/elastic/test.rakedoc/integration/elasticsearch.md