From 376729b44c887cb6f77d079983296e0031717510 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 31 Dec 2014 11:50:20 -0800 Subject: [PATCH] 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 --- .../PhabricatorSetupCheckRepositories.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/applications/config/check/PhabricatorSetupCheckRepositories.php b/src/applications/config/check/PhabricatorSetupCheckRepositories.php index a938132479..0d87a2cc6c 100644 --- a/src/applications/config/check/PhabricatorSetupCheckRepositories.php +++ b/src/applications/config/check/PhabricatorSetupCheckRepositories.php @@ -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) {