Home
DevCentral
Search
Configure Global Search
Log In
Transactions
T999
Change Details
Change Details
Old
New
Diff
Could be solved now or be solved as a part of T851. ``` [2016-08-28 14:07:22] production.INFO: [Gate] New payload. {"service":"GitHub","door":"Keruald","delivery":"bc7ff280-6d28-11e6-8d52-99b763b32b8a","event":"push "} [2016-08-28 14:07:22] production.ERROR: exception 'RuntimeException' with message 'No credentials for Phabricator project Keruald.' in /var/wwwroot/default/app /Phabricator/PhabricatorAPI.php:67 Stack trace: #0 /var/wwwroot/default/app/Phabricator/PhabricatorAPIFactory.php(26): Nasqueron\Notifications\Phabricator\PhabricatorAPI::forProject('Keruald') #1 /var/wwwroot/default/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(218): Nasqueron\Notifications\Phabricator\PhabricatorAPIFactory->get ForProject('Keruald') #2 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(146): Illuminate\Support\Facades\Facade::__callStatic('getForProject', Array) #3 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(146): Nasqueron\Notifications\Facades\PhabricatorAPI::getForProject('Keruald') #4 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(136): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchAPI() #5 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(75): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchRequirements() #6 /var/wwwroot/default/app/Listeners/PhabricatorListener.php(40): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->handle() #7 /var/wwwroot/default/app/Listeners/PhabricatorListener.php(26): Nasqueron\Notifications\Listeners\PhabricatorListener->notifyNewCommits(Object(Nasqueron\Not ifications\Events\GitHubPayloadEvent)) #8 [internal function]: Nasqueron\Notifications\Listeners\PhabricatorListener->onGitHubPayload(Object(Nasqueron\Notifications\Events\GitHubPayloadEvent)) #9 /var/wwwroot/default/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(348): call_user_func_array(Array, Array) #10 [internal function]: Illuminate\Events\Dispatcher->Illuminate\Events\{closure}(Object(Nasqueron\Notifications\Events\GitHubPayloadEvent)) #11 /var/wwwroot/default/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(221): call_user_func_array(Object(Closure), Array) #12 /var/wwwroot/default/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(218): Illuminate\Events\Dispatcher->fire(Object(Nasqueron\Notificat ions\Events\GitHubPayloadEvent)) #13 /var/wwwroot/default/app/Http/Controllers/Gate/GitHubGateController.php(190): Illuminate\Support\Facades\Facade::__callStatic('fire', Array) #14 /var/wwwroot/default/app/Http/Controllers/Gate/GitHubGateController.php(190): Illuminate\Support\Facades\Event::fire(Object(Nasqueron\Notifications\Events\ GitHubPayloadEvent)) #15 /var/wwwroot/default/app/Http/Controllers/Gate/GitHubGateController.php(89): Nasqueron\Notifications\Http\Controllers\Gate\GitHubGateController->onPayload( ) #16 [internal function]: Nasqueron\Notifications\Http\Controllers\Gate\GitHubGateController->onPost('Keruald') ```
291a59a6 introduced exceptions in PhabricatorAPI static constructors. Formerly, they returned null. When a new payload comes from GitHub, the NotifyNewCommitsToDiffusion job notifies Phabricator of the new commit. But when there is no Phabricator instance for the same door (or in the future a mapping, see T851), the code doesn't detect this new exception. This error occurs in our production notifications.nasqueron.org instance: ``` [2017-01-07 06:14:10] production.ERROR: RuntimeException: No credentials for Phabricator project Keruald. in /var/wwwroot/default/app/Phabricator/PhabricatorAP I.php:67 Stack trace: #0 /var/wwwroot/default/app/Phabricator/PhabricatorAPIFactory.php(26): Nasqueron\Notifications\Phabricator\PhabricatorAPI::forProject('Keruald') #1 /var/wwwroot/default/bootstrap/cache/compiled.php(6325): Nasqueron\Notifications\Phabricator\PhabricatorAPIFactory->getForProject('Keruald') #2 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(146): Illuminate\Support\Facades\Facade::__callStatic('getForProject', Array) #3 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(136): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchAPI() #4 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(75): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchRequirements() #5 /var/wwwroot/default/app/Listeners/PhabricatorListener.php(40): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->handle() #6 /var/wwwroot/default/app/Listeners/PhabricatorListener.php(26): Nasqueron\Notifications\Listeners\PhabricatorListener->notifyNewCommits(Object(Nasqueron\Not ifications\Events\GitHubPayloadEvent)) ``` NOTE: tests for `NotifyNewCommitsToDiffusion` are needed to detect this kind of issue during refactoring.
Could be solved now or be solved as a part of T851.
291a59a6 introduced exceptions in PhabricatorAPI static constructors. Formerly, they returned null. When a new payload comes from GitHub, the NotifyNewCommitsToDiffusion job notifies Phabricator of the new commit. But when there is no Phabricator instance for the same door (or in the future a mapping, see T851), the code doesn't detect this new exception. This error occurs in our production notifications.nasqueron.org instance:
``` [
2016-08-28 14:07:22
2017-01-07 06:14:10
] production.
INFO: [Gate] New payload
ERROR: RuntimeException: No credentials for Phabricator project Keruald
.
{"service":"GitHub","door":"Keruald","delivery":"bc7ff280-6d28-11e6-8d52-99b763b32b8a","event":"push "} [2016-08-28 14:07:22] production.ERROR: exception 'RuntimeException' with message 'No credentials for Phabricator project Keruald.' in /var/wwwroot/default/app
in /var/wwwroot/default/app/Phabricator/PhabricatorAP
/Phabricator/PhabricatorAP
I.php:67 Stack trace: #0 /var/wwwroot/default/app/Phabricator/PhabricatorAPIFactory.php(26): Nasqueron\Notifications\Phabricator\PhabricatorAPI::forProject('Keruald') #1 /var/wwwroot/default/
vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(218): Nasqueron\Notifications\Phabricator\PhabricatorAPIFactory->get
bootstrap/cache/compiled.php(6325): Nasqueron\Notifications\Phabricator\PhabricatorAPIFactory->get
ForProject('Keruald') #2 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(146): Illuminate\Support\Facades\Facade::__callStatic('getForProject', Array) #3 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.
php(146): Nasqueron\Notifications\Facades\PhabricatorAPI::getForProject('Keruald') #4 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.
php(136): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchAPI()
#5
#4
/var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(75): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchRequirements()
#6
#5
/var/wwwroot/default/app/Listeners/PhabricatorListener.php(40): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->handle()
#7
#6
/var/wwwroot/default/app/Listeners/PhabricatorListener.php(26): Nasqueron\Notifications\Listeners\PhabricatorListener->notifyNewCommits(Object(Nasqueron\Not ifications\Events\GitHubPayloadEvent))
#8 [internal function]: Nasqueron\Notifications\Listeners\PhabricatorListener->onGitHubPayload(Object(Nasqueron\Notifications\Events\GitHubPayloadEvent)) #9 /var/wwwroot/default/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(348): call_user_func_array(Array, Array) #10 [internal function]: Illuminate\Events\Dispatcher->Illuminate\Events\{closure}(Object(Nasqueron\Notifications\Events\GitHubPayloadEvent)) #11 /var/wwwroot/default/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(221): call_user_func_array(Object(Closure), Array) #12 /var/wwwroot/default/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(218): Illuminate\Events\Dispatcher->fire(Object(Nasqueron\Notificat ions\Events\GitHubPayloadEvent)) #13 /var/wwwroot/default/app/Http/Controllers/Gate/GitHubGateController.php(190): Illuminate\Support\Facades\Facade::__callStatic('fire', Array) #14 /var/wwwroot/default/app/Http/Controllers/Gate/GitHubGateController.php(190): Illuminate\Support\Facades\Event::fire(Object(Nasqueron\Notifications\Events\ GitHubPayloadEvent)) #15 /var/wwwroot/default/app/Http/Controllers/Gate/GitHubGateController.php(89): Nasqueron\Notifications\Http\Controllers\Gate\GitHubGateController->onPayload( ) #16 [internal function]: Nasqueron\Notifications\Http\Controllers\Gate\GitHubGateController->onPost('Keruald')
```
NOTE: tests for `NotifyNewCommitsToDiffusion` are needed to detect this kind of issue during refactoring.
Continue