Skip to content

Remove elasticsearch call on init

What does this MR do and why?

In 17.0 in Add embeddings to issues if on Elasticsearch 8+ (!149209 - merged) we introduced adding a vector field to the issues index in Elasticsearch. To determine whether or not to add the field, we need to know if the cluster is Elasticsearch and above version 8. This requires making a call to Elasticsearch to find information about the cluster.

Because the mapping uses the elasticsearch-ruby gem which loads the mapping during initialize, this check is done during init. This caused an issue for a customer in 17.4 because one of the pod (rails migration) couldn't start due to this check failing.

The customer was able to solve it but we should prevent further issues. In Move embeddings from issues index to workitems ... (#476537 - closed) we are moving embeddings from the issues index to workitems index and due to the new indexing framework, we no longer need to load mappings on initialize.

Once this change is done (in 17.4), we will delete the issues index. This MR removes the vector field from mappings since the issues index will be deleted in any case and we want to prevent further customer issues. It will also be backported. Also note that issue embeddings has only been available for gitlab.com so no SM instances are impacted by removing this mapping change.

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.

Related to #480405 (closed)

Edited by Madelein van Niekerk

Merge request reports

Loading