devguard icon indicating copy to clipboard operation
devguard copied to clipboard

Retry outgoing webhooks

Open timbastin opened this issue 3 months ago • 5 comments

Currently devguard will send a webhook to another application only once. If the delivery fails, devguard wont tell the user and will never retry those webhooks.

I think it might be a good idea to have a webhook log which lists all outgoing webhooks including their payload. This would give us the opportunity to have something like an "error" column.

  • [x] Retry failed webhooks at least 3 times with 1, 5, 10 seconds between tries
  • [ ] Add webhook error log table which lists all failed outgoing webhooks
  • [ ] Add a endpoint which will trigger a retry of all failed webhooks

timbastin avatar Sep 11 '25 17:09 timbastin

hey @timbastin i would love to contribute if this issue is open for contribution!!

vr-varad avatar Nov 02 '25 13:11 vr-varad

@vr-varad hey! Of course it is open for contribution. Go ahead and open a pr for it. If you need any help, let me know!

timbastin avatar Nov 02 '25 14:11 timbastin

hey @timbastin , https://github.com/l3montree-dev/devguard/blob/6d3ab9d3abd74b5db265043a078ee119f4c71d2f/internal/core/integrations/webhook/webhook_client.go#L61

this is the webhook createRequest function which currently has retry logic.

also is the where this issue require changes ?

vr-varad avatar Nov 04 '25 02:11 vr-varad

// @timbastin

vr-varad avatar Nov 18 '25 14:11 vr-varad

// @timbastin

Oh so sorry - thanks a lot for the reminder. I just ticked the first checkbox. We added a pretty simple retry logic, but nothing which is capable to display to the user. What we would need right here is really a new database table. Something like "errors" we could display to the user. Otherwise those failing requests will just fail in silence

timbastin avatar Nov 18 '25 14:11 timbastin