Improve clarity around Reindexing Status in the UI
Problem to solve
If a user has at some point attempted to do a reindex, the UI will show Reindexing Status: <state>
under Elasticsearch zero-downtime reindexing
in the admin panel. In the case of a failure, it may show Reindexing Status: failure
which makes it seem like action needs to be taken, or that you are unable to use the zero-downtime reindexing feature.
We can verify that there is no current reindexing task by running:
irb(main):005:0> ::Elastic::ReindexingTask.current
=> nil
irb(main):001:0> ::Elastic::ReindexingTask.running?
=> false
In addition to this, a user might see Error: You have unapplied advanced search migrations. Please wait until it is finished
even if there are no pending migrations. This messaging is a bit confusing and doesn't give the user much detail on if action needs to be taken, or how it affects their instance.
Proposal
We should adjust our messaging when there has been a previous reindexing failure. Perhaps including the current state and the previous state would be helpful. If something needs attention, we should provide a better understanding or link to our docs on how you would go above resolving it. We should additionally be more targeted with our messaging about unapplied migrations to avoid confusion.
Implementation plan
frontend
Add two sections for reindexing status:
- In progress reindexing status
- show a message "no reindex in progress" if a reindex is not in progress
- show info about the reindexing status if it's in progress
- settings used (multiplier and slices)
- started at
- progress bars (we have these currently)
- Last reindexing status
- show info about the last reindexing that occurred
- state: completed, failed
- settings used (multiplier and slices)
- started at
- finished at
- errors
backend work will be done in #501102 (closed)