Webhook test events have different time formats than actual events
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
GitLab Webhooks have different time formats when testing a webhook in comparison to actual event triggers. I found this behaviour specifically with pipeline events, which were causing ingestion problems in OpenSearch with the different time formats between the two events.
Steps to reproduce
- Create a project with a simple pipeline (
echo 'hello world'
for example) -
Create a project level webhook with
Pipeline events
trigger, using one of our documented debugging methods - Run a pipeline or ensure a pipeline has previously run on the project
- Test the webhook manually, store webhook payload.
- Trigger a new pipeline on the project, observe webhook is triggered and store the payload
From this example, you will notice the different time formats for some fields. See below example:
Pipeline event trigger (automatic)
"finished_at":"2025-05-21 16:06:02 UTC"
Manual test event trigger
"finished_at":"2025-05-21T16:06:02.869Z"
Example Project
Reproduced on self-managed.
What is the current bug behavior?
Webhook test events have different time format than actual triggered webhook events. Causes some potential processing/ingestion problems.
What is the expected correct behavior?
Times should be in the same format (RFC3339
)
Relevant logs and/or screenshots
Sanitised Logs
Automatic pipeline event trigger
{"object_kind":"pipeline","object_attributes":{"id":5,"iid":4,"name":null,"ref":"main","tag":false,"sha":"482d523b0cda5182a41ae441c920800c0bd262ca","before_sha":"0000000000000000000000000000000000000000","source":"web","status":"success","detailed_status":"passed","stages":["debug"],"created_at":"2025-05-21 16:05:54 UTC","finished_at":"2025-05-21 16:06:03 UTC","duration":5,"queued_duration":3,"variables":[],"url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline/-/pipelines/5"},"merge_request":null,"user":{"id":2,"name":"Thomas","username":"thomas","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/2/HD-headshot.png","email":"[REDACTED]"},"project":{"id":17,"name":"Simple Pipeline","description":null,"web_url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline","avatar_url":null,"git_ssh_url":"ssh://git@gitlab.example.com:2222/acme-corp/webhook-debug/simple-pipeline.git","git_http_url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline.git","namespace":"Webhook Debug","visibility_level":0,"path_with_namespace":"acme-corp/webhook-debug/simple-pipeline","default_branch":"main","ci_config_path":null},"commit":{"id":"482d523b0cda5182a41ae441c920800c0bd262ca","message":"Update file .gitlab-ci.yml","title":"Update file .gitlab-ci.yml","timestamp":"2025-05-21T10:56:37+00:00","url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline/-/commit/482d523b0cda5182a41ae441c920800c0bd262ca","author":{"name":"Thomas","email":"email@example.com"}},"builds":[{"id":5,"stage":"debug","name":"hello-world","status":"success","created_at":"2025-05-21 16:05:54 UTC","started_at":"2025-05-21 16:05:57 UTC","finished_at":"2025-05-21 16:06:02 UTC","duration":5.072297,"queued_duration":2.179805,"failure_reason":null,"when":"on_success","manual":false,"allow_failure":false,"user":{"id":2,"name":"Thomas","username":"thomas","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/2/HD-headshot.png","email":"[REDACTED]"},"runner":{"id":2,"description":"","runner_type":"instance_type","active":true,"is_shared":true,"tags":[]},"artifacts_file":{"filename":null,"size":null},"environment":null}]}
Manual test pipeline event trigger
{"object_kind":"pipeline","object_attributes":{"id":5,"iid":4,"name":null,"ref":"main","tag":false,"sha":"482d523b0cda5182a41ae441c920800c0bd262ca","before_sha":"0000000000000000000000000000000000000000","source":"web","status":"success","detailed_status":"passed","stages":["debug"],"created_at":"2025-05-21T16:05:54.719Z","finished_at":"2025-05-21T16:06:03.075Z","duration":5,"queued_duration":3,"variables":[],"url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline/-/pipelines/5"},"merge_request":null,"user":{"id":2,"name":"Thomas","username":"thomas","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/2/HD-headshot.png","email":"[REDACTED]"},"project":{"id":17,"name":"Simple Pipeline","description":null,"web_url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline","avatar_url":null,"git_ssh_url":"ssh://git@gitlab.example.com:2222/acme-corp/webhook-debug/simple-pipeline.git","git_http_url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline.git","namespace":"Webhook Debug","visibility_level":0,"path_with_namespace":"acme-corp/webhook-debug/simple-pipeline","default_branch":"main","ci_config_path":null},"commit":{"id":"482d523b0cda5182a41ae441c920800c0bd262ca","message":"Update file .gitlab-ci.yml","title":"Update file .gitlab-ci.yml","timestamp":"2025-05-21T10:56:37+00:00","url":"https://gitlab.example.com/acme-corp/webhook-debug/simple-pipeline/-/commit/482d523b0cda5182a41ae441c920800c0bd262ca","author":{"name":"Thomas","email":"email@example.com"}},"builds":[{"id":5,"stage":"debug","name":"hello-world","status":"success","created_at":"2025-05-21T16:05:54.738Z","started_at":"2025-05-21T16:05:57.797Z","finished_at":"2025-05-21T16:06:02.869Z","duration":5.072297,"queued_duration":2.179805,"failure_reason":null,"when":"on_success","manual":false,"allow_failure":false,"user":{"id":2,"name":"Thomas","username":"thomas","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/2/HD-headshot.png","email":"[REDACTED]"},"runner":{"id":2,"description":"","runner_type":"instance_type","active":true,"is_shared":true,"tags":[]},"artifacts_file":{"filename":null,"size":null},"environment":null}]}