Differential D21767 Diff 51903 src/applications/config/check/PhabricatorManualActivitySetupCheck.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorManualActivitySetupCheck.php
Show All 36 Lines | private function raiseSearchReindexIssue() { | ||||
$message[] = pht( | $message[] = pht( | ||||
'The indexing algorithm for the fulltext search index has been '. | 'The indexing algorithm for the fulltext search index has been '. | ||||
'updated and the index needs to be rebuilt. Until you rebuild the '. | 'updated and the index needs to be rebuilt. Until you rebuild the '. | ||||
'index, global search (and other fulltext search) will not '. | 'index, global search (and other fulltext search) will not '. | ||||
'function correctly.'); | 'function correctly.'); | ||||
$message[] = pht( | $message[] = pht( | ||||
'You can rebuild the search index while Phabricator is running.'); | 'You can rebuild the search index while the server is running.'); | ||||
$message[] = pht( | $message[] = pht( | ||||
'To rebuild the index, run this command:'); | 'To rebuild the index, run this command:'); | ||||
$message[] = phutil_tag( | $message[] = phutil_tag( | ||||
'pre', | 'pre', | ||||
array(), | array(), | ||||
(string)csprintf( | (string)csprintf( | ||||
'phabricator/ $ ./bin/search index --all --force --background')); | '$ ./bin/search index --all --force --background')); | ||||
$message[] = pht( | $message[] = pht( | ||||
'You can find more information about rebuilding the search '. | 'You can find more information about rebuilding the search '. | ||||
'index here: %s', | 'index here: %s', | ||||
phutil_tag( | phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => 'https://phurl.io/u/reindex', | 'href' => 'https://phurl.io/u/reindex', | ||||
'target' => '_blank', | 'target' => '_blank', | ||||
), | ), | ||||
'https://phurl.io/u/reindex')); | 'https://phurl.io/u/reindex')); | ||||
$message[] = pht( | $message[] = pht( | ||||
'After rebuilding the index, run this command to clear this setup '. | 'After rebuilding the index, run this command to clear this setup '. | ||||
'warning:'); | 'warning:'); | ||||
$message[] = phutil_tag( | $message[] = phutil_tag( | ||||
'pre', | 'pre', | ||||
array(), | array(), | ||||
'phabricator/ $ ./bin/config done reindex'); | '$ ./bin/config done reindex'); | ||||
$activity_message = phutil_implode_html("\n\n", $message); | $activity_message = phutil_implode_html("\n\n", $message); | ||||
$this->newIssue('manual.reindex') | $this->newIssue('manual.reindex') | ||||
->setName($activity_name) | ->setName($activity_name) | ||||
->setSummary($activity_summary) | ->setSummary($activity_summary) | ||||
->setMessage($activity_message); | ->setMessage($activity_message); | ||||
} | } | ||||
private function raiseRebuildIdentitiesIssue() { | private function raiseRebuildIdentitiesIssue() { | ||||
$activity_name = pht('Rebuild Repository Identities'); | $activity_name = pht('Rebuild Repository Identities'); | ||||
$activity_summary = pht( | $activity_summary = pht( | ||||
'The mapping from VCS users to Phabricator users has changed '. | 'The mapping from VCS users to %s users has changed '. | ||||
'and must be rebuilt.'); | 'and must be rebuilt.', | ||||
PlatformSymbols::getPlatformServerName()); | |||||
$message = array(); | $message = array(); | ||||
$message[] = pht( | $message[] = pht( | ||||
'The way Phabricator attributes VCS activity to Phabricator users '. | 'The way VCS activity is attributed %s user accounts has changed.', | ||||
'has changed. There is a new indirection layer between the strings '. | PlatformSymbols::getPlatformServerName()); | ||||
'that appear as VCS authors and committers (such as "John Developer '. | |||||
'<johnd@bigcorp.com>") and the Phabricator user that gets associated '. | $message[] = pht( | ||||
'with VCS commits. This is to support situations where users '. | 'There is a new indirection layer between the strings that appear as '. | ||||
'are incorrectly associated with commits by Phabricator making bad '. | 'VCS authors and committers (such as "John Developer '. | ||||
'guesses about the identity of the corresponding Phabricator user. '. | '<johnd@bigcorp.com>") and the user account that gets associated '. | ||||
'with VCS commits.'); | |||||
$message[] = pht( | |||||
'This change supports situations where users are incorrectly '. | |||||
'associated with commits because the software makes a bad guess '. | |||||
'about how the VCS string maps to a user account. '. | |||||
'This also helps with situations where existing repositories are '. | 'This also helps with situations where existing repositories are '. | ||||
'imported without having created accounts for all the committers to '. | 'imported without having created accounts for all the committers to '. | ||||
'that repository. Until you rebuild these repository identities, you '. | 'that repository. Until you rebuild these repository identities, you '. | ||||
'are likely to encounter problems with future Phabricator features '. | 'are likely to encounter problems with features which rely on the '. | ||||
'which will rely on the existence of these identities.'); | 'existence of these identities.'); | ||||
$message[] = pht( | $message[] = pht( | ||||
'You can rebuild repository identities while Phabricator is running.'); | 'You can rebuild repository identities while the server is running.'); | ||||
$message[] = pht( | $message[] = pht( | ||||
'To rebuild identities, run this command:'); | 'To rebuild identities, run this command:'); | ||||
$message[] = phutil_tag( | $message[] = phutil_tag( | ||||
'pre', | 'pre', | ||||
array(), | array(), | ||||
(string)csprintf( | (string)csprintf( | ||||
'phabricator/ $ '. | '$ ./bin/repository rebuild-identities --all-repositories')); | ||||
'./bin/repository rebuild-identities --all-repositories')); | |||||
$message[] = pht( | $message[] = pht( | ||||
'You can find more information about this new identity mapping '. | 'You can find more information about this new identity mapping '. | ||||
'here: %s', | 'here: %s', | ||||
phutil_tag( | phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => 'https://phurl.io/u/repoIdentities', | 'href' => 'https://phurl.io/u/repoIdentities', | ||||
'target' => '_blank', | 'target' => '_blank', | ||||
), | ), | ||||
'https://phurl.io/u/repoIdentities')); | 'https://phurl.io/u/repoIdentities')); | ||||
$message[] = pht( | $message[] = pht( | ||||
'After rebuilding repository identities, run this command to clear '. | 'After rebuilding repository identities, run this command to clear '. | ||||
'this setup warning:'); | 'this setup warning:'); | ||||
$message[] = phutil_tag( | $message[] = phutil_tag( | ||||
'pre', | 'pre', | ||||
array(), | array(), | ||||
'phabricator/ $ ./bin/config done identities'); | '$ ./bin/config done identities'); | ||||
$activity_message = phutil_implode_html("\n\n", $message); | $activity_message = phutil_implode_html("\n\n", $message); | ||||
$this->newIssue('manual.identities') | $this->newIssue('manual.identities') | ||||
->setName($activity_name) | ->setName($activity_name) | ||||
->setSummary($activity_summary) | ->setSummary($activity_summary) | ||||
->setMessage($activity_message); | ->setMessage($activity_message); | ||||
} | } | ||||
} | } |