Page MenuHomeDevCentral

Improve API replies handling in NotifyNewCommitsToDiffusion
ClosedPublic

Authored by dereckson on Jan 7 2017, 19:35.
Tags
None
Referenced Files
F3749143: D807.id2048.diff
Sat, Nov 16, 13:00
F3749096: D807.id2045.diff
Sat, Nov 16, 12:44
F3749094: D807.id2046.diff
Sat, Nov 16, 12:43
F3748800: D807.diff
Sat, Nov 16, 10:46
Unknown Object (File)
Tue, Nov 12, 15:35
Unknown Object (File)
Sat, Nov 9, 23:05
Unknown Object (File)
Sat, Nov 9, 23:05
Unknown Object (File)
Sat, Nov 9, 14:41
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 Passed
Unit
Tests Passed
Branch
T999 (branched from master)
Build Status
Buildable 1238
Build 1486: arc lint + arc unit

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.