1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

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:
epriestley 2020-09-17 13:34:50 -07:00
parent a754c694de
commit f21a00a315

View file

@ -67,10 +67,17 @@ final class PhabricatorRepositoryCommitPublishWorker
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->closeTasks($viewer, $commit);
$this->applyTransactions($viewer, $repository, $commit);
}
private function applyTransactions(