mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-15 18:10:53 +01:00
(stable) Don't apply patches or mark patches applied with bin/storage upgrade --dryrun
Summary: Fixes T12682. Test Plan: Ran `bin/storage upgrade --dryrun` repeatedly with un-applied patches, saw it not apply them and not mark them applied. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12682 Differential Revision: https://secure.phabricator.com/D17837
This commit is contained in:
parent
22c3e49b51
commit
b0df33e6ec
1 changed files with 6 additions and 2 deletions
|
@ -1090,7 +1090,9 @@ abstract class PhabricatorStorageManagementWorkflow
|
|||
}
|
||||
|
||||
$t_begin = microtime(true);
|
||||
$api->applyPatch($patch);
|
||||
if (!$is_dryrun) {
|
||||
$api->applyPatch($patch);
|
||||
}
|
||||
$t_end = microtime(true);
|
||||
|
||||
$duration = ($t_end - $t_begin);
|
||||
|
@ -1100,7 +1102,9 @@ abstract class PhabricatorStorageManagementWorkflow
|
|||
// If we're explicitly reapplying this patch, we don't need to
|
||||
// mark it as applied.
|
||||
if (!isset($state_map[$ref_key][$key])) {
|
||||
$api->markPatchApplied($key, ($t_end - $t_begin));
|
||||
if (!$is_dryrun) {
|
||||
$api->markPatchApplied($key, ($t_end - $t_begin));
|
||||
}
|
||||
$applied_map[$ref_key][$key] = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue