mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Remove ancient "phd.trace" and "phd.verbose" configuration options
Summary: Ref T13556. These options are very old and effectively obsoleted by "bin/phd debug [--trace]". I haven't used either option diagnostically in many years, and they aren't mentioned in the documentation. Remove them to simplify configuration, and because "phd.trace" doesn't work anyway and likely hasn't for a long time -- it has specific issues with TTY detection (see T13556). Test Plan: Grepped for "phd.trace" and "phd.verbose". Ran "bin/phd debug [--trace]" and saw verbose/trace output. Maniphest Tasks: T13556 Differential Revision: https://secure.phabricator.com/D21426
This commit is contained in:
parent
78d1b62bb8
commit
a27c83757d
5 changed files with 23 additions and 42 deletions
|
@ -8,14 +8,21 @@ final class PhabricatorDaemonsSetupCheck extends PhabricatorSetupCheck {
|
||||||
|
|
||||||
protected function executeChecks() {
|
protected function executeChecks() {
|
||||||
|
|
||||||
$task_daemon = id(new PhabricatorDaemonLogQuery())
|
try {
|
||||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
$task_daemons = id(new PhabricatorDaemonLogQuery())
|
||||||
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||||
->withDaemonClasses(array('PhabricatorTaskmasterDaemon'))
|
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
|
||||||
->setLimit(1)
|
->withDaemonClasses(array('PhabricatorTaskmasterDaemon'))
|
||||||
->execute();
|
->setLimit(1)
|
||||||
|
->execute();
|
||||||
|
|
||||||
if (!$task_daemon) {
|
$no_daemons = !$task_daemons;
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
// Just skip this warning if the query fails for some reason.
|
||||||
|
$no_daemons = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($no_daemons) {
|
||||||
$doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd');
|
$doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd');
|
||||||
|
|
||||||
$summary = pht(
|
$summary = pht(
|
||||||
|
|
|
@ -322,6 +322,9 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck {
|
||||||
'directly supported. Prefixes and other strings may be customized with '.
|
'directly supported. Prefixes and other strings may be customized with '.
|
||||||
'"translation.override".');
|
'"translation.override".');
|
||||||
|
|
||||||
|
$phd_reason = pht(
|
||||||
|
'Use "bin/phd debug ..." to get a detailed daemon execution log.');
|
||||||
|
|
||||||
$ancient_config += array(
|
$ancient_config += array(
|
||||||
'phid.external-loaders' =>
|
'phid.external-loaders' =>
|
||||||
pht(
|
pht(
|
||||||
|
@ -539,6 +542,9 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck {
|
||||||
|
|
||||||
'phd.pid-directory' => pht(
|
'phd.pid-directory' => pht(
|
||||||
'Phabricator daemons no longer use PID files.'),
|
'Phabricator daemons no longer use PID files.'),
|
||||||
|
|
||||||
|
'phd.trace' => $phd_reason,
|
||||||
|
'phd.verbose' => $phd_reason,
|
||||||
);
|
);
|
||||||
|
|
||||||
return $ancient_config;
|
return $ancient_config;
|
||||||
|
|
|
@ -43,22 +43,6 @@ final class PhabricatorPHDConfigOptions
|
||||||
"configuration changes are picked up by the daemons ".
|
"configuration changes are picked up by the daemons ".
|
||||||
"automatically, but pool sizes can not be changed without a ".
|
"automatically, but pool sizes can not be changed without a ".
|
||||||
"restart.")),
|
"restart.")),
|
||||||
$this->newOption('phd.verbose', 'bool', false)
|
|
||||||
->setLocked(true)
|
|
||||||
->setBoolOptions(
|
|
||||||
array(
|
|
||||||
pht('Verbose mode'),
|
|
||||||
pht('Normal mode'),
|
|
||||||
))
|
|
||||||
->setSummary(pht("Launch daemons in 'verbose' mode by default."))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
"Launch daemons in 'verbose' mode by default. This creates a lot ".
|
|
||||||
"of output, but can help debug issues. Daemons launched in debug ".
|
|
||||||
"mode with '%s' are always launched in verbose mode. ".
|
|
||||||
"See also '%s'.",
|
|
||||||
'phd debug',
|
|
||||||
'phd.trace')),
|
|
||||||
$this->newOption('phd.user', 'string', null)
|
$this->newOption('phd.user', 'string', null)
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setSummary(pht('System user to run daemons as.'))
|
->setSummary(pht('System user to run daemons as.'))
|
||||||
|
@ -68,22 +52,6 @@ final class PhabricatorPHDConfigOptions
|
||||||
'user will own the working copies of any repositories that '.
|
'user will own the working copies of any repositories that '.
|
||||||
'Phabricator imports or manages. This option is new and '.
|
'Phabricator imports or manages. This option is new and '.
|
||||||
'experimental.')),
|
'experimental.')),
|
||||||
$this->newOption('phd.trace', 'bool', false)
|
|
||||||
->setLocked(true)
|
|
||||||
->setBoolOptions(
|
|
||||||
array(
|
|
||||||
pht('Trace mode'),
|
|
||||||
pht('Normal mode'),
|
|
||||||
))
|
|
||||||
->setSummary(pht("Launch daemons in 'trace' mode by default."))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
"Launch daemons in 'trace' mode by default. This creates an ".
|
|
||||||
"ENORMOUS amount of output, but can help debug issues. Daemons ".
|
|
||||||
"launched in debug mode with '%s' are always launched in ".
|
|
||||||
"trace mode. See also '%s'.",
|
|
||||||
'phd debug',
|
|
||||||
'phd.verbose')),
|
|
||||||
$this->newOption('phd.garbage-collection', 'wild', array())
|
$this->newOption('phd.garbage-collection', 'wild', array())
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setLockedMessage(
|
->setLockedMessage(
|
||||||
|
|
|
@ -116,11 +116,11 @@ abstract class PhabricatorDaemonManagementWorkflow
|
||||||
$trace = PhutilArgumentParser::isTraceModeEnabled();
|
$trace = PhutilArgumentParser::isTraceModeEnabled();
|
||||||
|
|
||||||
$flags = array();
|
$flags = array();
|
||||||
if ($trace || PhabricatorEnv::getEnvConfig('phd.trace')) {
|
if ($trace) {
|
||||||
$flags[] = '--trace';
|
$flags[] = '--trace';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($debug || PhabricatorEnv::getEnvConfig('phd.verbose')) {
|
if ($debug) {
|
||||||
$flags[] = '--verbose';
|
$flags[] = '--verbose';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon {
|
||||||
if ($ex) {
|
if ($ex) {
|
||||||
if ($ex instanceof PhabricatorWorkerPermanentFailureException) {
|
if ($ex instanceof PhabricatorWorkerPermanentFailureException) {
|
||||||
// NOTE: Make sure these reach the daemon log, even when not
|
// NOTE: Make sure these reach the daemon log, even when not
|
||||||
// running in "phd.verbose" mode. See T12803 for discussion.
|
// running in verbose mode. See T12803 for discussion.
|
||||||
$log_exception = new PhutilProxyException(
|
$log_exception = new PhutilProxyException(
|
||||||
pht(
|
pht(
|
||||||
'Task "%s" encountered a permanent failure and was '.
|
'Task "%s" encountered a permanent failure and was '.
|
||||||
|
|
Loading…
Reference in a new issue