Adjust merge request webhook execution timing
What does this MR do and why?
Due to the async merge request generation, users could receive the webhook before the merge request diff is ready. This changes that by triggering the webhook when the merge request diff is ready.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Create an example webhook and subscribe to merge request events
- Run
gdk stop rails-background-jobs
to stop the background worker temporarily to mimic the async delay - Create an MR
- Verify webhooks are not executed by either checking the development log or the entry in the WebHookLog
- Run
gdk start rails-background-jobs
to process the AfterCreateWorker - Wait until the background job runs and MR show page loads all its contents as expected
- Verify the new webhook execution by either checking the development log or the entry in the WebHookLog
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #407312 (closed)
Edited by Sincheol (David) Kim