Skip to content

Avoid use of Elasticsearch joins in Global Merge Request searches

What does this MR do?

This is the 2nd last step in our efforts to avoid using joins in Elasticsearch and move merge requests to a new index &5468 (closed) . This changes the behaviour of searches at the global (any group, any project) level to no longer use joins (has_parent) queries and instead just use the new project_id and merge_requests_access_level fields that were added to the merge_requests type (denormalized).

These new fields needed to avoid joins are migrated in the migration added in !59836 (merged) .

This MR just needs to check that the migration is finished and if it is we can set no_join_project which was implemented in !48583 (merged) .

We also need to make sure we have tests for the state where the migration is not run so we don't accidentally break permission logic for unmigrated indices in any future refactorings.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Related to #322794 (closed)

Edited by Dylan Griffith

Merge request reports