-
Dylan Griffith authored
This is the 2nd last step in our efforts to avoid using joins in Elasticsearch and move merge requests to a new index https://gitlab.com/groups/gitlab-org/-/epics/5468 . 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 https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59836 . 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 https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48583 . 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. Changelog: changed
222fcf36