Commit Graph

8 Commits

Author SHA1 Message Date
GitLab Bot fd3d0d4c2c Add latest changes from gitlab-org/gitlab@master 2021-07-29 06:10:15 +00:00
GitLab Bot 254f79fb35 Add latest changes from gitlab-org/gitlab@master 2020-11-13 06:09:02 +00:00
GitLab Bot 7b875aa3fd Add latest changes from gitlab-org/gitlab@master 2019-12-11 06:07:52 +00:00
GitLab Bot e464f195ff Add latest changes from gitlab-org/gitlab@master 2019-10-14 12:06:14 +00:00
Gabriel Mazetto b4f2050207 Skip project validation when switching storage layouts
This is a fix for the Hashed Storage migration and Rollback procedure
to ignore any project-level validation error that can happen in a
long-running instance.

There are many situations where defaults and acceptable values changed
but, because we didn't provide a migration to "valid" attributes, it
can happen that project will not be `valid? => true`.

Because the changes we are making are limited to setting a project as
read_only or changing the storage_level, it's safe to bypass validation.
2019-03-05 04:00:53 +01:00
Gabriel Mazetto 264394f6d3 Extract and simplify more code into BaseRepositoryService`
`try_to_set_repository_read_only!` is now on the Base class.
Simplified Exception classes from 2 to 1 with a more descriptive name.
2019-03-01 15:49:20 +01:00
Gabriel Mazetto fc0ff92807 Added Rollbacker workers and support on the rake task
Rollback is done similar to Migration for the Hashed Storage.
It also shares the same ExclusiveLease key to prevent both happening
at the same time.

All Hashed Storage related workers now share the same queue namespace
which allows for assigning dedicated workers easily.
2019-03-01 15:49:20 +01:00
Gabriel Mazetto 1592b5830f Adds Rollback functionality to HashedStorage migration
We are adding sidekiq workers and service classes to allow to rollback
a hashed storage migration. There are some refactoring involved as well
as part of the code can be reused by both the migration and the rollback
logic.
2019-03-01 15:49:20 +01:00