Show warning if code search mappings are outdated
What does this MR do and why?
This MR depends on !96785 (merged) and marked as draft to prevent accidental merge
This MR shows a warning for self-managed customers if it detects that mappings are outdated to recommend them reindex their instance in order to improve code search quality.
Screenshots or screen recordings
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable Advanced Search if it's not enabled
- Open
/admin/application_settings/advanced_search
- If you don't see the warning, you have a fresh index, so you might want to update its meta field by running
curl -H 'Content-type: application/json' -XPOST 'http://localhost:9200/gitlab-development/_mappings' -d '{ "_meta": { "created_by": "15.4.0" } }'
- Refresh the page
- You now should see the warning
- Execute
curl -H 'Content-type: application/json' -XPOST 'http://localhost:9200/gitlab-development/_mappings' -d '{ "_meta": { "created_by": "15.5.0-pre" } }'
- Refresh the page
- Warning should disappear
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #346914 (closed)
Edited by Dmitry Gruzd