GitLab Merge Request Webhook/Callback Latency
Problem Statement
The measured time delay between creating a new GitLab Merge Request from the GitLab console and when the webhook is received is 20-40+ seconds.
While testing Merge Requests with EasyCLA (our CLA authorization tool) we have observed a significant delay between when the time the Merge Request is created (presses the button on the GitLab UX to create the Merge Request) and the time we received the webhook callback. The delay details are indicated below. The entire workflow works as expected, but the delay leads to a bad user experience.
Additionally, most maintainers and contributors would not consider this an issue as most CI/CD pipeline workflows are expected to take significant time and resources to execute. Delayed startup times are expected/assumed. However, certain status checks can be easily accomplished with immediate feedback to the user. Examples would include DCO signoff checks and CLA authorization checks. In these circumstances, the delay raises questions/concerns such as: 1) Is the tool working?, 2) Am I authorized? 3) Do I need to refresh the page?
Latency Details
The EasyCLA team reviewed our API event logs and attempted to measure the overall latency using a combination of wall-clock time and log times. Here's a typical example:
GitLab MR Start - 17:41:42
EasyCLA callback rcv/start - 17:42:23
EasyCLA callback end - 17:42:25
Total MR Update Duration - ~43 secs
Reach
This impacts all Maintainers and Contributors (end-users) who want quick feedback on pipeline status.
Impact
The impact is subjective - the EasyCLA CLA Authorization functionality works as expected. However, the user experience is sub-optimal.
Functional Impact: 0 UX Impact : 1.0 (low-mid) as it might confuse users to lead to more questions
Confidence
The GitLab technical team can weigh in on if this delay is by design or if any optimizations can be done to reduce the latency in the webhook notification scheduler.
Effort
TBD
Definition of Done
The EasyCLA team would like to see webhooks/callbacks delivered with 5 seconds of an event trigger.