Skip to content

Add repository size limit check during import

What does this MR do and why?

Check if the repository size is smaller than the limit otherwise, delete the repository and fail the import.

This change is only available in GitLab EE as it relies on the project#repository_checker_method which is only available in EE

Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/395764

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:post_import_repository_size_check)
  2. Import a project using the importers: Bitbucket Cloud, Bitbucket Server, Git, Gitea, and GitHub. See the instructions below on how to test each importer
  3. Check if the import state was marked as failed if the repository size is over the limit and if the repository was deleted

Bitbucket Cloud

bitbucket_cloud

Bitbucket Server

bitbucket_server

Git

git

Gitea

gitea

GitHub

github

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 Rodrigo Tomonari

Merge request reports

Loading