Skip to content

Adds MemberApprovalFinder and modifies Controller to use it

Suraj Tripathi requested to merge 433173_add_member_approval_finder into master

What does this MR do and why?

This is a Follow Up MR of the Base MR that adds logic to list Pending Promotion Members. That MR is still in maintainer review. As a follow up to that change, this change moves the query logic inside a Finder. Since this MR is based on top of the Base MR and cannot be merged before that one gets merged.

PS: This feature is still a WIP and isn't yet enabled for customers

  • Adds MemberApprovalFinder
  • Adds corresponding spec
  • Updates GroupMemberController and ProjectMemberController to use the Finder
  • Updates corresponding controller request spec

ref: #433173 (closed)

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

Database Query

The table is empty on production, sharing a sample query and query plan

Query:

SELECT "member_approvals".* FROM "member_approvals" WHERE "member_approvals"."member_namespace_id" = 25 AND "member_approvals"."status" = 0

Screenshot_2024-04-15_at_5.00.51_PM

https://postgres.ai/console/gitlab/gitlab-production-main/sessions/27540/commands/85761

Edited by Suraj Tripathi

Merge request reports