Add limit for group count within namespaces

What does this MR do and why?

Add limit as popover for group dependencies project search.

EE: true Changelog: changed

Based on this comment and this issue.

Screenshots or screen recordings

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

Under the limit Over the limit
fully_enabled locations_only_popover

Query plan

The query plan bellow uses the group with highest count, i.e., 1683

Link to the query plan

SELECT COUNT(*) FROM "namespaces" WHERE "namespaces"."type" = 'Group' AND (traversal_ids @> ARRAY[6543]);

How to set up and validate locally

  1. Fetch the content of both branches: add_limit_for_group_count.
  2. Turn on the feature flag to make Dependency list appear in groups:
echo "Feature.enable(:group_level_dependencies)" | rails c
  1. Create two projects under a group with the following content:
  • .gitlab-ci.yml:
include:
  - template: Security/Dependency-Scanning.gitlab-ci.yml
  1. Run a pipeline for the default branch to both projects
  2. Go group related to the projects created above and click on the menu option Secure -> Dependency list
  3. Change GROUP_COUNT_LIMIT to 1 in order to trigger the over the limit behaviour.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Zamir Martins

Merge request reports

Loading