Skip to content

fix: make WebHookWorker retry on Gitlab::HTTP::HTTP_ERRORS

What does this MR do and why?

During WebHookService.execute, whenever it encountered HTTP_ERRORS, it should reraise the error. So that the WebHookWorker can trigger the retry logic.

Why: I didn't find any retry logic on HTTP_ERRORS in WebHookWorker. However, many of the HTTP_ERRORS can only suggest that the internet may not be stable temporarily. That does not necessisarily mean that gitlab app is definitely unable to deliver the webhook out. Hence a retry machenism is desirable here.

There might be a better way to retry on HTTP_ERRORS cause changing the behavior of WebHookService may introduce side effects outside of WebHookWorker. <-- Suggestions are welcomed here. But one thing for sure is we should retry in such scenario.

Screenshots or screen recordings

How to set up and validate locally

MR acceptance checklist

Please give me some feedbacks on the direction of the change. Once agreement was made, I will go through the acceptance checklist and update the tests.

Edited by Yang Liu

Merge request reports

Loading