Fix an out-of-order issue in the new update-during-publish behavior
Summary: Ref T13552. The Herald field "Accepted Differential revision" (and similar fields) depend on the task/revision update steps running before Herald executes. Herald currently executes first, so it never sees associated revisions. Swap this order. Test Plan: Published a commit, got a clean parse/import. Will test with production rules ("Cowboy Commits"). Maniphest Tasks: T13552 Differential Revision: https://secure.phabricator.com/D21468
This commit is contained in:
@@ -67,10 +67,17 @@ final class PhabricatorRepositoryCommitPublishWorker
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->applyTransactions($viewer, $repository, $commit);
|
// NOTE: Close revisions and tasks before applying transactions, because
|
||||||
|
// we want a side effect of closure (the commit being associated with
|
||||||
|
// a revision) to occur before a side effect of transactions (Herald
|
||||||
|
// executing). The close methods queue tasks for the actual updates to
|
||||||
|
// commits/revisions, so those won't occur until after the commit gets
|
||||||
|
// transactions.
|
||||||
|
|
||||||
$this->closeRevisions($viewer, $commit);
|
$this->closeRevisions($viewer, $commit);
|
||||||
$this->closeTasks($viewer, $commit);
|
$this->closeTasks($viewer, $commit);
|
||||||
|
|
||||||
|
$this->applyTransactions($viewer, $repository, $commit);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function applyTransactions(
|
private function applyTransactions(
|
||||||
|
Reference in New Issue
Block a user