Skip to content

Show banner when search indices are detected as read-only

Cleveland Bledsoe Jr requested to merge cleveland-index-blocks-popup into master

What does this MR do and why?

This MR adds a warning to the Search page to check if any of the indices are read-only.

Closes #353108

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
before.png after.png

How to set up and validate locally

  1. Set up GDK with Elasticsearch

  2. Start, Index, and Enable Elasticsearch per the Setup instructions

  3. Go to the Admin Area > Settings > Search and verify that there are no alerts

  4. Put one of the indices into read-only mode by doing the following:

    curl -H 'Content-Type: application/json' -XPUT "http://localhost:9200/gitlab-development-users/_settings" -d '{ "index.blocks.read_only" : "true" }'
  5. Refresh the Advanced Search page in GDK and verify that the alert shows that it is in read-only and it lists the one index.

  6. Put other indices into read-only and verify that all affected indices are listed.

  7. Set all affected indices to false to disable read-only and verify the alert goes away.

Edited by Dmitry Gruzd

Merge request reports

Loading