Page MenuHomePhabricator

Index "Call Webhook" in Herald, and show calling rules on the Webhook page

Authored by epriestley on Mar 7 2019, 2:37 PM.



Depends on D20259. Now that we can index Herald rules to affected objects, show callers on the "Webhooks" UI.

A few other rule types could get indexes too ("Sign Legalpad Documents", "Add Reviewers", "Add Subscribers"), but I think they're less likely to be useful since those triggers are usually more obvious (the transaction timeline makes it clearer what happened/why). We could revisit this in the future now that it's a possibility.

Test Plan

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Mar 7 2019, 2:37 PM
epriestley requested review of this revision.Mar 7 2019, 2:39 PM
epriestley updated this revision to Diff 48354.Mar 7 2019, 3:24 PM
  • Push fixes for null/empty behavior back to the previous revision.
amckinley accepted this revision.Mar 7 2019, 10:12 PM
amckinley added inline comments.


This revision is now accepted and ready to land.Mar 7 2019, 10:12 PM
epriestley added inline comments.Mar 7 2019, 10:19 PM

Oh, I'll stick like a setLimit(10) here and on the similar one in BuildPlan before I land this. I doubt anyone is going to write 19,000 herald rules to run a particular plan or call a particular hook, but no sense in breaking the page if they get super creative.


This is a list of Rules which have a "Call Webhook: ..." action -- they may not have actually fired yet.

Although you're probably using this panel to answer a question like "Which rule is calling / just called this hook?", it could also answer a question like "I'm pretty sure I wrote a rule for this but the hook isn't being called, which rule did I write?".

epriestley updated this revision to Diff 48371.Mar 7 2019, 10:20 PM
  • Add the limits to prevent crazy behavior if you write a million rules to call a single hook/plan.
Owners added a subscriber: Restricted Owners Package.Mar 7 2019, 10:20 PM
This revision was automatically updated to reflect the committed changes.