Skip to content

Add `active` parameter to ProjectFinder

What does this MR do and why?

Add active parameter to the ProjectFinder determines whether to include or exclude active projects.

Active projects are those that are neither archived or marked_for_deletion.

This parameter is needed to allow filtering for inactive/active groups on our APIs #467265 (closed)

Query Plans

Added the query plan of an existing parameter to use as a baseline.

It is difficult to get results within our desired timing guideline because project finder is historically known to suffer from performance issues (e.g. 500 HTTP error)


Before (with an existing parameter archived=only)

After (with the new parameter active=false)


Before (with an existing parameter archived=false)

After (with the new parameter active=true)


Note:

References

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Add EE license to your GDK instance.
  2. On a project, go to Settings > General > Advanced > Delete Project to move the project for pending delete.
  3. On another project, go to Settings > General > Advanced > Archive Project to move the project to archived.
  4. In the rails console, run the following:
    • ProjectsFinder.new(current_user: User.first, params: { active: false }).execute: to get inactive projects.
    • ProjectsFinder.new(current_user: User.first, params: { active: true }).execute: to get active + inactive projects.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Shane Maglangit

Merge request reports

Loading