mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-23 05:01:13 +01:00
In "bin/repository reparse", continue on "PhabricatorWorkerPermanentFailureException"
Summary: Fixes T13315. See that task for discussion. Without `--background`, we currently treat this as a catastrophic failure, but it's relatively routine for some repository states. We can safely continue reparsing other steps. Test Plan: Ran `bin/repository reparse --all X --message` with commits faked to all be unreachable. Got warnings instead of a hard failure on first problem. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13315 Differential Revision: https://secure.phabricator.com/D20588
This commit is contained in:
parent
aba7c98bae
commit
731b45d818
1 changed files with 18 additions and 6 deletions
|
@ -252,12 +252,24 @@ final class PhabricatorRepositoryManagementReparseWorkflow
|
|||
);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
PhabricatorWorker::scheduleTask(
|
||||
$class,
|
||||
$spec,
|
||||
array(
|
||||
'priority' => PhabricatorWorker::PRIORITY_IMPORT,
|
||||
));
|
||||
try {
|
||||
PhabricatorWorker::scheduleTask(
|
||||
$class,
|
||||
$spec,
|
||||
array(
|
||||
'priority' => PhabricatorWorker::PRIORITY_IMPORT,
|
||||
));
|
||||
} catch (PhabricatorWorkerPermanentFailureException $ex) {
|
||||
// See T13315. We expect some reparse steps to occasionally raise
|
||||
// permanent failures: for example, because they are no longer
|
||||
// reachable. This is a routine condition, not a catastrophic
|
||||
// failure, so let the user know something happened but continue
|
||||
// reparsing any remaining commits.
|
||||
echo tsprintf(
|
||||
"<bg:yellow>** %s **</bg> %s\n",
|
||||
pht('WARN'),
|
||||
$ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
$progress->update(1);
|
||||
|
|
Loading…
Reference in a new issue