1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00

Don't check "repository.default-local-path" for readability in a cluster environment

Summary:
Ref T2783. When repository services are defined, skip the check for local repository storage.

In particular, in the Phacility cluster, this path won't exist on web nodes, but nothing will ever try to access it.

Test Plan: Verified new branch gets hit with cluster services defined.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2783

Differential Revision: https://secure.phabricator.com/D11100
This commit is contained in:
epriestley 2014-12-31 11:50:20 -08:00
parent 00192ec8ce
commit 376729b44c

View file

@ -3,6 +3,25 @@
final class PhabricatorSetupCheckRepositories extends PhabricatorSetupCheck {
protected function executeChecks() {
$cluster_services = id(new AlmanacServiceQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withServiceClasses(
array(
'AlmanacClusterRepositoryServiceType',
))
->setLimit(1)
->execute();
if ($cluster_services) {
// If cluster repository services are defined, these checks aren't useful
// because some nodes (like web nodes) will usually not have any local
// repository information.
// Errors with this configuration will still be detected by checks on
// individual repositories.
return;
}
$repo_path = PhabricatorEnv::getEnvConfig('repository.default-local-path');
if (!$repo_path) {