You need to sign in or sign up before continuing.
Allow excluding archived projects from merge request search
What does this MR do and why?
Enables excluding merge requests from archived projects from search results behind a feature flag search_merge_requests_hide_archived_projects
- Add
archived
(boolean) to merge request mappings - Backfill
archived
for all merge requests in the index - Add a filter for excluding archived projects if the option
include_archived
is not true (only if the migrations are finished and the feature flag is enabled)
How to set up and validate locally
- Ensure elasticsearch is running
- Run the migration worker a few times to execute the migrations
- Disable the feature flag
Feature.disable(:search_merge_requests_hide_archived_projects)
- Find a project with a merge request
- Do search for the merge request: the merge request should be in the results
- Enable the feature flag
Feature.enablesearch_merge_requests_hide_archived_projects)
- Do search for the merge request: the merge request should be in the results
- Archive the project
- Do search for the merge request: the merge request should NOT be in the results
- Do search for the merge request with the param
include_archived=true
: the merge request should be in the results - Repeat steps 2-10 with the added param
basic_search=true
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.
Related to #414904 (closed)
Edited by Madelein van Niekerk