[go: up one dir, main page]

Fix Bitbucket importer status page timing out and add pagination

What does this MR do and why?

This MR updates Bitbucket Importer status page and introduces infinite scroll, similar to github importer. This is needed because we have users who have extreme amounts of repositories (multiple thousands) and status page times out, which makes it impossible to migrate the projects.

It uses cursor based pagination, where we:

  1. Fetch the list of repositories, ordered by created_at
  2. Check after value in the response, which should include the next page of projects
  3. As we scroll down, next page should be populated

References

#582706

Screenshots or screen recordings

image

Before After

How to set up and validate locally

  1. Setup bitbucket OAuth https://docs.gitlab.com/integration/bitbucket/
  2. Create 25+ projects on bitbucket so that pagination can be tested (or change this constant to a lower value)
  3. Go to http://localhost:3000/import/bitbucket/status and observe network tab. Requests to status.json endpoint should be made with after query string containing a created_at cursor/date
  4. Keep scrolling. New projects should keep appearing until all projects are listed

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 George Koltsov

Merge request reports

Loading