Create and document a rake task for marking a re-indexing task as failed
Release notes
Sometimes we need to mark a re-indexing task as failed in order to move on or to start from scratch.
Right now we don't this documented anywhere and it would be a lot more convenient for customers and users to run a rake-task instead of opening the gitlab-rails console
and running: Elastic::ReindexingTask.current.update!(state: :failure)
.
Problem to solve
We need a more convenient way of marking a re-indexing task as failed.
Intended users
Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/
User experience goal
Customers and users should be able to simply run a rake-task to mark a re-index attempt as failed.
Proposal
Create a rake-task to substitute going into the rails console and running: Elastic::ReindexingTask.current.update!(state: :failure)
Further details
This has happened in a scenario where a customer/user has triggered a zero-downtime re-index after which they actually wanted to upgrade the ES version and changed the entire ES server (since that was more convenient for them).
They were unable to re-index because they first needed to mark the initial reindexing task as failed.
Permissions and Security
Documentation
https://docs.gitlab.com/ee/integration/elasticsearch.html
Availability & Testing
What does success look like, and how can we measure that?
Customers and users will have a rake task to mark a zero-downtime task as failed.