Page MenuHomeDevCentral

Improve API replies handling in NotifyNewCommitsToDiffusion
ClosedPublic

Authored by dereckson on Jan 7 2017, 19:35.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 18, 01:07
Unknown Object (File)
Sun, Apr 14, 22:31
Unknown Object (File)
Sun, Apr 14, 22:27
Unknown Object (File)
Sun, Apr 14, 22:22
Unknown Object (File)
Sun, Apr 14, 13:31
Unknown Object (File)
Tue, Apr 9, 23:38
Unknown Object (File)
Tue, Apr 9, 13:12
Unknown Object (File)
Tue, Apr 9, 13:06
Subscribers
None

Details

Summary

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 thrown.

Fixes T999.

Test Plan

Improve NotifyNewCommitsToDiffusionTest to correctly
mock Phabricator API replies, and test each scenarii.

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson edited edge metadata.

Quick test for no repo but switch to a provider

Simplify test, dataProvider

dereckson retitled this revision from Fix NotifyNewCommitsToDiffusion to Improve API replies handling in NotifyNewCommitsToDiffusion.
dereckson edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Jan 7 2017, 20:34
This revision was automatically updated to reflect the committed changes.