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:
parent
00192ec8ce
commit
376729b44c
1 changed files with 19 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue