Commit 2e74ec19 authored by David Fernandez's avatar David Fernandez

Merge branch '356984-fix-timestamp' into 'master'

Fix handling of non-existing repos during registry phase 2 migration

See merge request gitlab-org/gitlab!84070
parents 52bfda7f 963b1420
......@@ -174,7 +174,7 @@ class ContainerRepository < ApplicationRecord
end
end
before_transition %i[importing import_aborted] => :import_done do |container_repository|
before_transition any => :import_done do |container_repository|
container_repository.migration_import_done_at = Time.zone.now
end
......
......@@ -139,7 +139,8 @@ RSpec.describe ContainerRepository, :aggregate_failures do
expect { subject }
.to change { repository.reload.migration_state }.to('import_done')
.and change { repository.reload.migration_skipped_reason }.to('not_found')
.and change { repository.migration_skipped_reason }.to('not_found')
.and change { repository.migration_import_done_at }.from(nil)
end
end
end
......
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