Skip to content

Avoid repository size checkings in snippet migrations for migration bot

What does this MR do?

At the moment, we have a max size limit for snippets Gitlab::CurrentSettings.snippet_size_limit. This limit can only be updated through the Rails console. This means that it can be modified by self-hosted users.

When we commit to snippet repositories we also respect this limit and check whether the push plus the existing size is above that limit.

Nevertheless, in the snippet migration, this can create weird scenarios. For example:

  1. User creates snippet with size 30 MB
  2. Admin user lower the limit to 20MB, making the former snippet invalid
  3. We perform the migration and fails because of the size

Migrating all the existing snippets is very important in order to avoid migrated and non migrated at the same time. Therefore, we need to migrate these snippets as well.

For these, we will use the migration bot and avoid the snippet repository size checkings only when we're performing the migration.

Does this MR meet the acceptance criteria?

Conformity

Edited by 🤖 GitLab Bot 🤖

Merge request reports