Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook JSON spec from docs for timestamps differs from actual JSON sent in webhook POST #422

Open
mikezucc opened this issue Feb 25, 2019 · 2 comments

Comments

4 participants
@mikezucc
Copy link

commented Feb 25, 2019

Buildkite docs: "created_at": "2015-05-09T21:05:59.874Z",

Actual datetime in webhook POST payload containing : "created_at": "2018-11-14 18:57:50 UTC",

Is this a distinction between GET requests to Buildkite's api/v2 vs the POST from buildkite services?

@mikezucc mikezucc changed the title Webhook JSON spec for timestamps differs from actual JSON Webhook JSON spec from docs for timestamps differs from actual JSON sent in webhook POST Feb 25, 2019

@harrietgrace

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

Hey @mikezucc the format of the created_at attribute is indeed different in POST webhooks that come from Buildkite 😅 I'm not sure why they're different though... @keithpitt, are they formatted differently for a particular reason?

@toolmantim

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

@ticky did some digging about this already:

webhook payloads' date formatting is the default to_s format, whilst that in the API is iso8601
the difference appears to be that the webhooks use Request::Performer which uses JSON.dump, whilst the API uses Yajl

ActiveSupport::JSON.encode appears to do the right thing too maybe we need to move Request::Performer to one of them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.