|
|
|
|
@ -151,6 +151,20 @@ $assert(($rollbackProjection['status'] ?? null) === 'rolled_back'
|
|
|
|
|
=== 'completed',
|
|
|
|
|
'Rollback progress hid the interrupted migration stage.');
|
|
|
|
|
|
|
|
|
|
$retryingRollback = $migration('rollback_running');
|
|
|
|
|
$retryingRollback->error_code = 'migration_source_rollback_failed';
|
|
|
|
|
$retryingRollback->target_receive_job_id = 2;
|
|
|
|
|
$retryProjection = CloudInstanceMigrationWorkflow::progress(
|
|
|
|
|
$retryingRollback
|
|
|
|
|
);
|
|
|
|
|
$assert(($step($retryProjection, 'prepare')['status'] ?? null)
|
|
|
|
|
=== 'completed'
|
|
|
|
|
&& ($step($retryProjection, 'transfer')['status'] ?? null)
|
|
|
|
|
=== 'interrupted'
|
|
|
|
|
&& ($step($retryProjection, 'rollback')['status'] ?? null)
|
|
|
|
|
=== 'running',
|
|
|
|
|
'Retrying rollback rewrote completed source preparation as interrupted.');
|
|
|
|
|
|
|
|
|
|
$completed = $migration('completed');
|
|
|
|
|
$completed->target_receive_job_id = 2;
|
|
|
|
|
$completed->activate_job_id = 3;
|
|
|
|
|
|