Disable invalid WebHooks
About
This issue was created from this discussion: #336837 (comment 634902767).
Some WebHook
records are invalid and we continue to execute them. This led to the errors in #336837 (closed). We would like to disable invalid web hook records so we don't execute them, and flag them to users so they can make them valid if possible.
Proposal
As suggested by @toupeira we could lazily disable these by evaluating #valid?
on the record at hook execution time. A good candidate for catching all hooks (webhooks and integration hooks) would be somewhere in WebHookService
, on the worker queue.
We might want a new property called active
/disabled
to toggle disabling hooks #336837 (comment 637075696).
We might want to display disabled webhooks in the frontend, and we might want to integrate this aspect with the rate-limiting UI #331407 (closed).
We might want #disable!
, #enable!
and #backoff!
to integrate with this property so we don't have two system of disabling (.executable
and #executable?
will always need to consider the rate-limiting time-based disabled_until
property though).