Skip to content

Fix pagination on Explore > Groups page

What does this MR do and why?

As per #437350 (closed), our initial Explore/Groups page, are not loading pagination correctly, therefore we have to address the problem.

We're fetching self_and_ancestors, for the initial state, where both filter are parent_id params are not present.

After digging into more details, I've found that per https://docs.gitlab.com/ee/api/rest/#pagination-response-headers:

For performance reasons, if a query returns more than 10,000 records, GitLab doesn’t return the following headers:

Therefore, I've limited the GroupsFinder not to fetch more than 10k records.

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

Before After
image

How to set up and validate locally

  1. Checkout the branch
  2. Visit the Explore/Groups page with signed-in user as well with in the guest mode (you can use incognito window for this)
  3. Verify that pagination is displayed as expected 🎉

note: we could also visit https://gitlab-review-437350-exp-8fwnyf.gitlab-review.app/explore/groups and verify it! 🎉

Related to #437350 (closed)

Edited by Bojan Marjanovic

Merge request reports