@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+18 -6
+18 -6
src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php
··· 252 252 ); 253 253 254 254 foreach ($classes as $class) { 255 - PhabricatorWorker::scheduleTask( 256 - $class, 257 - $spec, 258 - array( 259 - 'priority' => PhabricatorWorker::PRIORITY_IMPORT, 260 - )); 255 + try { 256 + PhabricatorWorker::scheduleTask( 257 + $class, 258 + $spec, 259 + array( 260 + 'priority' => PhabricatorWorker::PRIORITY_IMPORT, 261 + )); 262 + } catch (PhabricatorWorkerPermanentFailureException $ex) { 263 + // See T13315. We expect some reparse steps to occasionally raise 264 + // permanent failures: for example, because they are no longer 265 + // reachable. This is a routine condition, not a catastrophic 266 + // failure, so let the user know something happened but continue 267 + // reparsing any remaining commits. 268 + echo tsprintf( 269 + "<bg:yellow>** %s **</bg> %s\n", 270 + pht('WARN'), 271 + $ex->getMessage()); 272 + } 261 273 } 262 274 263 275 $progress->update(1);