Fix create_migrations_index for ES6
What does this MR do?
This MR fixes an exception for Elasticsearch 6 (ES7 works fine and we test against it in our specs) when we're trying to create a migrations index.
[1] pry(main)> Gitlab::Elastic::Helper.default.create_migrations_index
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [completed : {type=boolean}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [properties]: Root mapping definition has unsupported parameters: [completed : {type=boolean}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [completed : {type=boolean}]"}},"status":400}
from /home/dgruzd/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/elasticsearch-transport-6.8.2/lib/elasticsearch/transport/transport/base.rb:208:in `__raise_transport_error'
QA pipeline that caught this error: https://gitlab.com/gitlab-org/gitlab-qa-mirror/-/jobs/847304449
Reported in: #281934 (comment 447152555)
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Dmitry Gruzd