Retry outgoing webhooks
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
hey @timbastin i would love to contribute if this issue is open for contribution!!
@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!
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 ?
// @timbastin
// @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