Add recent events to group hooks
What does this MR do and why?
Closes #325642 (closed)
While the group hook logs were being recorded in the database, they were not exposed in the UI.
This MR adds a Recent events table using the same layout that is shared by the project/integration/admin hooks.
Screenshots or screen recordings
Recent events table | Request details |
---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Please note that the video above walks through these steps below.
- Switch to the
master
branch in GDK. - Navigate to a group eg.
http://gdk.test:3000/gitlab-org
and then visit the group's Settings > Webhooks page. - Add a new group hook using push events. For the URL, I suggest using a generated endpoint via
https://webhook.site/
. - On the group hooks page, edit the group hook that you just created.
- On this page, observe that you only see one section currently (Edit Group Hook).
- Switch to the
group-webhooks-recent-deliveries
branch. - Refresh the previous page and observe that you can see two sections now (Edit Group Hook and Recent events). The Recent events should be empty since we haven't made any events yet.
- Test the group webhook - this will generate an event in the Recent events table. You can also check
https://webhook.site/
to confirm the call was made successfully. - On the generated event, click View details to see the request details.
- If you use
https://webhook.site/
for the URL, please note that it doesn't send back a response so it is expected that the<pre>
element under the Response is empty.
- If you use
- Test the retry by clicking the Resend Request button. This should redirect you back to the edit group hook page.
- There should now be a new event in the Recent events table. You can also check
https://webhook.site/
to confirm the call was made successfully.- If you don't see this request immediately, the job might be enqueued in Sidekiq. You can continuously refresh the page until it appears, or disable Sidekiq Cluster in GDK.
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.
Edited by Anton Smith