Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit e9b6631e authored by Gabriel Mazetto's avatar Gabriel Mazetto
Browse files

Allow partially migrated repositories to continue migration

Previously we verified if the projecthave at least migrated their
repository to hashed storage and prevented the migration command to
start a new migration.

The new version checks for the latest storage version available
(fully migrated), otherwise it allows migration to be triggered again.
parent 99a91ea23112
......@@ -1968,7 +1968,7 @@ def ff_merge_must_be_possible?
def migrate_to_hashed_storage!
return if hashed_storage?(:repository)
return unless storage_upgradable?
update!(repository_read_only: true)
title: 'Hashed Storage: allow migration to be retried in partially migrated projects'
merge_request: 23087
type: fixed
......@@ -3087,6 +3087,14 @@ def enable_lfs
it 'does not flag as read-only' do
expect { project.migrate_to_hashed_storage! }.not_to change { project.repository_read_only }
context 'when partially migrated' do
it 'returns true' do
project = create(:project, storage_version: 1, skip_disk_validation: true)
expect(project.migrate_to_hashed_storage!).to be_truthy
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment