Webhook finish time before start


I have a service that processes BuildKite webhooks and every once in a while it receives webhooks with times and states that do’t make much sense to me. For example:

"event": "job.finished",
  "job": {
    "type": "trigger",
    "state": "running",
    "created_at": "2021-11-16T23:44:49.100Z",
    "scheduled_at": "2021-11-16T22:00:32.551Z",
    "started_at": "2021-11-17T01:06:13.840Z",
    "finished_at": "2021-11-17T00:55:44.816Z",
    "runnable_at": "2021-11-16T23:44:49.211Z",

In the webhook above even though it is a job.finished event the state is running. And the finished_at is 10min before the started_at. Is this expected? If so could someone explain the rational behind it?

Hi @carlos.gonzalez! :wave:

Welcome to the community!

Hmm, interesting :thinking: Could you send more details like builds examples where you are seeing this to support@buildkite.com so we can have a better look?


Hi @paula,

Unfortunately I cannot do that, the webhooks are from a 3rd party my service just process them, so I cannot share that information as I do not have access to it. I can only say that it is been happening sporadically for the last week, where trigger type jobs have send finished jobs webhooks with state: running and finished_at < started_at.

I’ll try to reproduce in my own Buildkite org. But just to confirm, this is not expected behaviour is it?

He @carlos.gonzalez!

this is not expected behaviour is it?

Nop, I believe it’s not, but we’ll need to confirm it. If you are able to replicate it, please send the info to support so we can properly check it :slight_smile: