Webhook: add header of retry count
An Idempotency-Key
header was added in #388692 (closed) to allow webhook receivers to differentiate between retries of the same webhook event.
It could be useful to send through the attempt number also:
First sent :
Idempotency-Key: 908a6d9e-45fd-46c8-97e6-c4f350f219dd
X-Gitlab-Webhook-Attempt-Number: 1
Second sent :
Idempotency-Key: 908a6d9e-45fd-46c8-97e6-c4f350f219dd
X-Gitlab-Webhook-Attempt-Number: 2
Click to read original description
Hi,
I don't know if webhooks are stored into postgresql database, but it should be interesting to add a uuid token for each of them to differenciate and send it with request.
Like that, if a request is resent, we will be able to detect it. On Bitbucket platform, another header is added which display the count of send.
First sent :
X-Hook-Uuid: 908a6d9e-45fd-46c8-97e6-c4f350f219dd
X-Attempt-Number: 1
Second sent :
X-Hook-Uuid: 908a6d9e-45fd-46c8-97e6-c4f350f219dd
X-Attempt-Number: 2
In the future, it should be too valuable to expose new webservices in the API to list all recent requests or the retrieve an old payload using uuid token.
Can you generate both additionnal headers ?
Many thanks