mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Remove 'initFromConduit' option from Diffusion
Summary: Ref T2783. I think this served two purposes: - Improving performance in cases where we "know" a repository is local. - Preventing loops. It is now obsolete: - After D11476, refs can almost always resolve on a fast path. - As T2783 moves forward, we can usually no longer know when a repository is local without actually looking it up -- almost everything is allowed to run anywhere. - The cluster behavior in D11475 now prevents loops. Test Plan: `grep`, browsed around. This didn't really do much of anything anymore. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T2783 Differential Revision: https://secure.phabricator.com/D11477
This commit is contained in:
parent
d98eb2c8b8
commit
8d087ae738
6 changed files with 7 additions and 23 deletions
|
@ -236,7 +236,6 @@ final class DiffusionLintSaveRunner {
|
|||
foreach ($this->blame as $path => $lines) {
|
||||
$drequest = DiffusionRequest::newFromDictionary(array(
|
||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||
'initFromConduit' => false,
|
||||
'repository' => $repository,
|
||||
'branch' => $this->branch->getName(),
|
||||
'path' => $path,
|
||||
|
|
|
@ -102,7 +102,6 @@ abstract class DiffusionQueryConduitAPIMethod
|
|||
'branch' => $request->getValue('branch'),
|
||||
'path' => $request->getValue('path'),
|
||||
'commit' => $request->getValue('commit'),
|
||||
'initFromConduit' => false,
|
||||
));
|
||||
|
||||
// Figure out whether we're going to handle this request on this device,
|
||||
|
|
|
@ -215,10 +215,6 @@ abstract class DiffusionRequest {
|
|||
$this->didInitialize();
|
||||
}
|
||||
|
||||
final protected function shouldInitFromConduit() {
|
||||
return $this->initFromConduit;
|
||||
}
|
||||
|
||||
final public function setUser(PhabricatorUser $user) {
|
||||
$this->user = $user;
|
||||
return $this;
|
||||
|
@ -767,20 +763,13 @@ abstract class DiffusionRequest {
|
|||
// If we couldn't pull everything out of the cache, execute the underlying
|
||||
// VCS operation.
|
||||
if ($refs) {
|
||||
if ($this->shouldInitFromConduit()) {
|
||||
$vcs_results = DiffusionQuery::callConduitWithDiffusionRequest(
|
||||
$this->getUser(),
|
||||
$this,
|
||||
'diffusion.resolverefs',
|
||||
array(
|
||||
'refs' => $refs,
|
||||
));
|
||||
} else {
|
||||
$vcs_results = id(new DiffusionLowLevelResolveRefsQuery())
|
||||
->setRepository($this->getRepository())
|
||||
->withRefs($refs)
|
||||
->execute();
|
||||
}
|
||||
$vcs_results = DiffusionQuery::callConduitWithDiffusionRequest(
|
||||
$this->getUser(),
|
||||
$this,
|
||||
'diffusion.resolverefs',
|
||||
array(
|
||||
'refs' => $refs,
|
||||
));
|
||||
} else {
|
||||
$vcs_results = array();
|
||||
}
|
||||
|
|
|
@ -100,7 +100,6 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
|||
$drequest = DiffusionRequest::newFromDictionary(
|
||||
array(
|
||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||
'initFromConduit' => false,
|
||||
'repository' => $repository,
|
||||
'commit' => $commit->getCommitIdentifier(),
|
||||
));
|
||||
|
|
|
@ -87,7 +87,6 @@ final class PhabricatorOwnersPackagePathValidator {
|
|||
id(new PhabricatorRepository())->load($commit->getRepositoryID());
|
||||
$data = array(
|
||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||
'initFromConduit' => false,
|
||||
'repository' => $repository,
|
||||
'commit' => $commit->getCommitIdentifier(),
|
||||
);
|
||||
|
|
|
@ -375,7 +375,6 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
|
|||
}
|
||||
$drequest = DiffusionRequest::newFromDictionary(array(
|
||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||
'initFromConduit' => false,
|
||||
'repository' => $this->repository,
|
||||
'commit' => $this->commit->getCommitIdentifier(),
|
||||
'path' => $path,
|
||||
|
|
Loading…
Reference in a new issue