Skip to content

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

  1. Create an example webhook and subscribe to merge request events
  2. Run gdk stop rails-background-jobs to stop the background worker temporarily to mimic the async delay
  3. Create an MR
  4. Verify webhooks are not executed by either checking the development log or the entry in the WebHookLog
  5. Run gdk start rails-background-jobs to process the AfterCreateWorker
  6. Wait until the background job runs and MR show page loads all its contents as expected
  7. 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.

Related to #407312 (closed)

Edited by Sincheol (David) Kim

Merge request reports

Loading