mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-22 20:51:10 +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) {
|
foreach ($this->blame as $path => $lines) {
|
||||||
$drequest = DiffusionRequest::newFromDictionary(array(
|
$drequest = DiffusionRequest::newFromDictionary(array(
|
||||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||||
'initFromConduit' => false,
|
|
||||||
'repository' => $repository,
|
'repository' => $repository,
|
||||||
'branch' => $this->branch->getName(),
|
'branch' => $this->branch->getName(),
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
|
|
|
@ -102,7 +102,6 @@ abstract class DiffusionQueryConduitAPIMethod
|
||||||
'branch' => $request->getValue('branch'),
|
'branch' => $request->getValue('branch'),
|
||||||
'path' => $request->getValue('path'),
|
'path' => $request->getValue('path'),
|
||||||
'commit' => $request->getValue('commit'),
|
'commit' => $request->getValue('commit'),
|
||||||
'initFromConduit' => false,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
// Figure out whether we're going to handle this request on this device,
|
// Figure out whether we're going to handle this request on this device,
|
||||||
|
|
|
@ -215,10 +215,6 @@ abstract class DiffusionRequest {
|
||||||
$this->didInitialize();
|
$this->didInitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
final protected function shouldInitFromConduit() {
|
|
||||||
return $this->initFromConduit;
|
|
||||||
}
|
|
||||||
|
|
||||||
final public function setUser(PhabricatorUser $user) {
|
final public function setUser(PhabricatorUser $user) {
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -767,7 +763,6 @@ abstract class DiffusionRequest {
|
||||||
// If we couldn't pull everything out of the cache, execute the underlying
|
// If we couldn't pull everything out of the cache, execute the underlying
|
||||||
// VCS operation.
|
// VCS operation.
|
||||||
if ($refs) {
|
if ($refs) {
|
||||||
if ($this->shouldInitFromConduit()) {
|
|
||||||
$vcs_results = DiffusionQuery::callConduitWithDiffusionRequest(
|
$vcs_results = DiffusionQuery::callConduitWithDiffusionRequest(
|
||||||
$this->getUser(),
|
$this->getUser(),
|
||||||
$this,
|
$this,
|
||||||
|
@ -775,12 +770,6 @@ abstract class DiffusionRequest {
|
||||||
array(
|
array(
|
||||||
'refs' => $refs,
|
'refs' => $refs,
|
||||||
));
|
));
|
||||||
} else {
|
|
||||||
$vcs_results = id(new DiffusionLowLevelResolveRefsQuery())
|
|
||||||
->setRepository($this->getRepository())
|
|
||||||
->withRefs($refs)
|
|
||||||
->execute();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$vcs_results = array();
|
$vcs_results = array();
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,6 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
||||||
$drequest = DiffusionRequest::newFromDictionary(
|
$drequest = DiffusionRequest::newFromDictionary(
|
||||||
array(
|
array(
|
||||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||||
'initFromConduit' => false,
|
|
||||||
'repository' => $repository,
|
'repository' => $repository,
|
||||||
'commit' => $commit->getCommitIdentifier(),
|
'commit' => $commit->getCommitIdentifier(),
|
||||||
));
|
));
|
||||||
|
|
|
@ -87,7 +87,6 @@ final class PhabricatorOwnersPackagePathValidator {
|
||||||
id(new PhabricatorRepository())->load($commit->getRepositoryID());
|
id(new PhabricatorRepository())->load($commit->getRepositoryID());
|
||||||
$data = array(
|
$data = array(
|
||||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||||
'initFromConduit' => false,
|
|
||||||
'repository' => $repository,
|
'repository' => $repository,
|
||||||
'commit' => $commit->getCommitIdentifier(),
|
'commit' => $commit->getCommitIdentifier(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -375,7 +375,6 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
|
||||||
}
|
}
|
||||||
$drequest = DiffusionRequest::newFromDictionary(array(
|
$drequest = DiffusionRequest::newFromDictionary(array(
|
||||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
'user' => PhabricatorUser::getOmnipotentUser(),
|
||||||
'initFromConduit' => false,
|
|
||||||
'repository' => $this->repository,
|
'repository' => $this->repository,
|
||||||
'commit' => $this->commit->getCommitIdentifier(),
|
'commit' => $this->commit->getCommitIdentifier(),
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
|
|
Loading…
Reference in a new issue