diff options
author | Stan Hu <stanhu@gmail.com> | 2019-03-07 20:38:40 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-03-07 20:38:40 +0300 |
commit | f469bb8e5c3e7114e35862822087a1479d042a12 (patch) | |
tree | 46925003a1aa7c7cea72859ea04520f10d7a9177 /app | |
parent | a1a8202f081f75431dee14e246cd55acaddba2aa (diff) | |
parent | b4f205020797319f06c52f769f385876e6427309 (diff) |
Merge branch '56618-hashed-storage-skip-validation' into 'master'
Resolve "Hashed storage migration should not be attempted if project does not validate"
Closes #56618
See merge request gitlab-org/gitlab-ce!25753
Diffstat (limited to 'app')
4 files changed, 4 insertions, 4 deletions
diff --git a/app/services/projects/hashed_storage/migrate_attachments_service.rb b/app/services/projects/hashed_storage/migrate_attachments_service.rb index 9eaeb6eb4e7..3d0b8f58612 100644 --- a/app/services/projects/hashed_storage/migrate_attachments_service.rb +++ b/app/services/projects/hashed_storage/migrate_attachments_service.rb @@ -24,7 +24,7 @@ module Projects result = move_folder!(origin, target) if result - project.save! + project.save!(validate: false) yield if block_given? else diff --git a/app/services/projects/hashed_storage/migrate_repository_service.rb b/app/services/projects/hashed_storage/migrate_repository_service.rb index 5afa8732c0a..e8393128d58 100644 --- a/app/services/projects/hashed_storage/migrate_repository_service.rb +++ b/app/services/projects/hashed_storage/migrate_repository_service.rb @@ -27,7 +27,7 @@ module Projects end project.repository_read_only = false - project.save! + project.save!(validate: false) if result && block_given? yield diff --git a/app/services/projects/hashed_storage/rollback_attachments_service.rb b/app/services/projects/hashed_storage/rollback_attachments_service.rb index 6c370ac47e9..5c6b92f965c 100644 --- a/app/services/projects/hashed_storage/rollback_attachments_service.rb +++ b/app/services/projects/hashed_storage/rollback_attachments_service.rb @@ -19,7 +19,7 @@ module Projects result = move_folder!(origin, target) if result - project.save! + project.save!(validate: false) yield if block_given? else diff --git a/app/services/projects/hashed_storage/rollback_repository_service.rb b/app/services/projects/hashed_storage/rollback_repository_service.rb index b5c971c70a5..67733f4770b 100644 --- a/app/services/projects/hashed_storage/rollback_repository_service.rb +++ b/app/services/projects/hashed_storage/rollback_repository_service.rb @@ -27,7 +27,7 @@ module Projects end project.repository_read_only = false - project.save! + project.save!(validate: false) if result && block_given? yield |