agola-io/agola

notification: add apis to manage run webhooks retry logic

alessandro-sorint opened this issue · 0 comments

What would you like to be added:
Actually the notification service implement the logic to save the webhooks and deliverys.
We would like to add some apis for get and recreate deliverys.

Why is this needed:
With this apis the user can see the webhook's delivery and investigate about the sending errors.
The user can also redelivery the webhook.

The type RunWebhook need to add the field RunID.

The gateway apis we need to add are:

GET /projects/{projectref}/runs/{runnumber}/runwebhooks return the list of all webhooks for a run
GET /projects/{projectref}/runs/{runnumber}/runwebhookdeliveries/{runwebhookid}/runwebhookdeliveries return the list of all deliveries for a run webhook
POST /projects/{projectref}/runs/{runnumber}/runwebhooks/{runwebhookid}/runwebhookdeliveries/{runwebhookdeliveryid}/redelivery it recreate a delivery(the notification will resend the webhook);

Additional notes:
We want to ability the user to redelivery only failed delivery or all deliverys(like with github apis)? I prefer ability it for only failed delivery .