HomePhabricator

Make Herald rules more resilient

Description

Make Herald rules more resilient

Summary:
Make Herald conditions and actions more resilient (see discussion in D12896). This protects against invalid rules, which may have been valid in the past but are no longer valid. Specifically:

  • If a rule has an invalid field, the conditions fail and the actions do not execute.
  • The transcript shows that the rule failed because of an invalid field, and points at the issue.
  • If a rule has an invalid action, that action fails but other actions execute.
  • The transcript shows that the action failed.
  • Everything else (particularly, other rules) continues normally in both cases.
  • The edit interface is somewhat working when editing an invalid rule, but it could use some further improvements.

Test Plan:

  1. Ran this rule on a differential revision and saw the rule fail in the transcript.
  2. Was able to submit a differential without receiving an ERR-CONDUIT-CORE.
  3. Edited the Herald rule using the UI and was able to save the rule succesfully.
  4. Ran this rule on a differential revision and saw one success and one failure in the transcript.
  5. Was able to submit a differential without receiving an ERR-CONDUIT-CORE.
  6. Edited the Herald rule using the UI. Clicking save caused a HeraldInvalidActionException to be thrown, but maybe this is okay.

Differential Revision: http://phabricator.local/D41

Details

Group Auditors
Cowboy Commits
Provenance
joshuaspenceAuthored on
joshuaspencePushed on May 25 2015, 9:09 AM
Parents
rP18fe6d58aeba: Clicking in day view should create new event
Branches
Unknown
Tags
Unknown