Page MenuHomePhabricator

Disabling Herald incorrectly terminates commit import pipeline
Closed, ResolvedPublic

Description

I am importing a few repositories, but the progress seems to be stuck at "50.00% Complete". However, if I go to Diffusion and browse one of the repositories, clicking through to a commit, I get a message saying "This commit is still importing." There are no more tasks in the daemon queue related to the repository import, and so I'm not sure why it seems to be stuck here.

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a subscriber: joshuaspence.
> ./bin/repository importing T
rTbedb7a949e14fc4f30ab78aa6d06c130f6a35a3f Owners, Herald
rT175292d28b1aaefddc80da269589af0749e8f891 Owners, Herald
rT6dafec941a7cb2230316f494e33771b6ec634a8f Owners, Herald
...
joshuaspence renamed this task from Repository Import Stuff At 50% to Repository Import Stuck At 50%.Apr 6 2014, 12:39 AM

I think I have discovered the cause here... I had the owners application uninstalled, which means that the PhabricatorRepositoryCommitOwnersWorker tasks weren't being queued... and I'm guessing that as a result the PhabricatorRepositoryCommitHeraldWorker tasks weren't being queued either?

It looks like there are a couple of logical issues which can cause us to complete a PhabricatorRepositoryCommitOwnersWorker task without marking it as completed and without queueing the followup. Notably this block:

if ($repository->getDetail('herald-disabled')) {
  return;
}

If we exit early there, we'll never make it here:

$commit->writeImportStatusFlag(
  PhabricatorRepositoryCommit::IMPORTED_OWNERS);

if ($this->shouldQueueFollowupTasks()) {
  PhabricatorWorker::scheduleTask(
    'PhabricatorRepositoryCommitHeraldWorker',
    array(
      'commitID' => $commit->getID(),
    ));
}

Is it possible that's the explanation, rather than "Owners" being uninstalled? I don't immediately see a way that Owners not being installed could cause this, but maybe I'm just missing it.

(Those snippets are from PhabricatorRepositoryCommitOwnersWorker.)

Yes, you are correct. This was likely caused by the if ($repository->getDetail('herald-disabled')) { return; } logic.

epriestley renamed this task from Repository Import Stuck At 50% to Disabling Herald incorrectly terminates commit import pipeline.Apr 7 2014, 12:25 PM
epriestley triaged this task as Normal priority.