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

Patch io.redash.webhooks/event/jsonschema/1-0-0 #484

Closed
alexanderdean opened this issue Feb 2, 2017 · 4 comments
Closed

Patch io.redash.webhooks/event/jsonschema/1-0-0 #484

alexanderdean opened this issue Feb 2, 2017 · 4 comments
Assignees
Milestone

Comments

@alexanderdean
Copy link
Member

Based on changes from @arikfr noted here:

getredash/redash#1563 (comment)

@alexanderdean
Copy link
Member Author

Pushing back...

@jbeemster
Copy link
Member

Example events:

{
    "url_base": "",
    "event": "alert_state_change",
    "alert": {
        "state": "triggered",
        "query_id": 1,
        "name": "Manifest Count less than 4000",
        "rearm": 5,
        "updated_at": "2017-12-08T12:57:40.857855+00:00",
        "user_id": 3,
        "created_at": "2017-12-08T12:48:11.926306+00:00",
        "last_triggered_at": "2017-12-08T12:57:40.862476+00:00",
        "id": 1,
        "options": {
            "column": "count",
            "value": 4000,
            "op": "less than"
        }
    }
}
{
    "url_base": "",
    "event": "alert_state_change",
    "alert": {
        "state": "ok",
        "query_id": 1,
        "name": "Manifest Count less than 4000",
        "rearm": 5,
        "updated_at": "2017-12-08T12:58:25.057536+00:00",
        "user_id": 3,
        "created_at": "2017-12-08T12:48:11.926306+00:00",
        "last_triggered_at": "2017-12-08T12:58:25.064913+00:00",
        "id": 1,
        "options": {
            "column": "count",
            "value": 4000,
            "op": "greater than"
        }
    }
}

@jbeemster
Copy link
Member

@alexanderdean 126cf57

Have tested this heavily using Redash and Snowplow Mini and this schema now validates all incoming data.

There are two hacks in it:

  1. object_id is a string or an integer or a null
  2. created_at is a string (cannot be formatted as date-time as input is not correct)

Should we make bug reports for these two or simply patch the schema as is?

@alexanderdean
Copy link
Member Author

Thanks @jbeemster - patch is okay for 1, but for 2 let's talk to Arik and check his appetite to fix...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants