@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+23 -42
+14 -7
src/applications/config/check/PhabricatorDaemonsSetupCheck.php
··· 8 8 9 9 protected function executeChecks() { 10 10 11 - $task_daemon = id(new PhabricatorDaemonLogQuery()) 12 - ->setViewer(PhabricatorUser::getOmnipotentUser()) 13 - ->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE) 14 - ->withDaemonClasses(array('PhabricatorTaskmasterDaemon')) 15 - ->setLimit(1) 16 - ->execute(); 11 + try { 12 + $task_daemons = id(new PhabricatorDaemonLogQuery()) 13 + ->setViewer(PhabricatorUser::getOmnipotentUser()) 14 + ->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE) 15 + ->withDaemonClasses(array('PhabricatorTaskmasterDaemon')) 16 + ->setLimit(1) 17 + ->execute(); 18 + 19 + $no_daemons = !$task_daemons; 20 + } catch (Exception $ex) { 21 + // Just skip this warning if the query fails for some reason. 22 + $no_daemons = false; 23 + } 17 24 18 - if (!$task_daemon) { 25 + if ($no_daemons) { 19 26 $doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd'); 20 27 21 28 $summary = pht(
+6
src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
··· 322 322 'directly supported. Prefixes and other strings may be customized with '. 323 323 '"translation.override".'); 324 324 325 + $phd_reason = pht( 326 + 'Use "bin/phd debug ..." to get a detailed daemon execution log.'); 327 + 325 328 $ancient_config += array( 326 329 'phid.external-loaders' => 327 330 pht( ··· 539 542 540 543 'phd.pid-directory' => pht( 541 544 'Phabricator daemons no longer use PID files.'), 545 + 546 + 'phd.trace' => $phd_reason, 547 + 'phd.verbose' => $phd_reason, 542 548 ); 543 549 544 550 return $ancient_config;
-32
src/applications/config/option/PhabricatorPHDConfigOptions.php
··· 43 43 "configuration changes are picked up by the daemons ". 44 44 "automatically, but pool sizes can not be changed without a ". 45 45 "restart.")), 46 - $this->newOption('phd.verbose', 'bool', false) 47 - ->setLocked(true) 48 - ->setBoolOptions( 49 - array( 50 - pht('Verbose mode'), 51 - pht('Normal mode'), 52 - )) 53 - ->setSummary(pht("Launch daemons in 'verbose' mode by default.")) 54 - ->setDescription( 55 - pht( 56 - "Launch daemons in 'verbose' mode by default. This creates a lot ". 57 - "of output, but can help debug issues. Daemons launched in debug ". 58 - "mode with '%s' are always launched in verbose mode. ". 59 - "See also '%s'.", 60 - 'phd debug', 61 - 'phd.trace')), 62 46 $this->newOption('phd.user', 'string', null) 63 47 ->setLocked(true) 64 48 ->setSummary(pht('System user to run daemons as.')) ··· 68 52 'user will own the working copies of any repositories that '. 69 53 'Phabricator imports or manages. This option is new and '. 70 54 'experimental.')), 71 - $this->newOption('phd.trace', 'bool', false) 72 - ->setLocked(true) 73 - ->setBoolOptions( 74 - array( 75 - pht('Trace mode'), 76 - pht('Normal mode'), 77 - )) 78 - ->setSummary(pht("Launch daemons in 'trace' mode by default.")) 79 - ->setDescription( 80 - pht( 81 - "Launch daemons in 'trace' mode by default. This creates an ". 82 - "ENORMOUS amount of output, but can help debug issues. Daemons ". 83 - "launched in debug mode with '%s' are always launched in ". 84 - "trace mode. See also '%s'.", 85 - 'phd debug', 86 - 'phd.verbose')), 87 55 $this->newOption('phd.garbage-collection', 'wild', array()) 88 56 ->setLocked(true) 89 57 ->setLockedMessage(
+2 -2
src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
··· 116 116 $trace = PhutilArgumentParser::isTraceModeEnabled(); 117 117 118 118 $flags = array(); 119 - if ($trace || PhabricatorEnv::getEnvConfig('phd.trace')) { 119 + if ($trace) { 120 120 $flags[] = '--trace'; 121 121 } 122 122 123 - if ($debug || PhabricatorEnv::getEnvConfig('phd.verbose')) { 123 + if ($debug) { 124 124 $flags[] = '--verbose'; 125 125 } 126 126
+1 -1
src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php
··· 24 24 if ($ex) { 25 25 if ($ex instanceof PhabricatorWorkerPermanentFailureException) { 26 26 // NOTE: Make sure these reach the daemon log, even when not 27 - // running in "phd.verbose" mode. See T12803 for discussion. 27 + // running in verbose mode. See T12803 for discussion. 28 28 $log_exception = new PhutilProxyException( 29 29 pht( 30 30 'Task "%s" encountered a permanent failure and was '.