Advanced Search: Add meta field to indices mapping
What does this MR do and why?
This MR adds _meta
field to every Elasticsearch index for debugging purposes. As the first iteration we'll add Gitlab::VERSION
of the installation that created these indices.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Enable Advanced Search if it's not configured
- Checkout the branch of this MR
- Create an empty index by running:
Gitlab::Elastic::Helper.default.create_empty_index(with_alias: false)
- Note the index name which looks like
gitlab-development-20211222-1716
and execute the command using it as a path. For example:$ curl -s http://localhost:9200/gitlab-development-20211222-1716/_mappings | jq ".[].mappings._meta" { "created_by": "14.7.0-pre" }
- Ensure that it outputs current GitLab version
- Delete the newly created index by running:
curl -XDELETE http://localhost:9200/gitlab-development-20211222-1716
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.
Closes #349124 (closed)
Edited by Dmitry Gruzd