PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
19.45k stars 1.14k forks source link

Bug Report: Insight with a DataTableNode that has PersonsNode added to a dashboard throws a validation error on refresh #23490

Open skoob13 opened 3 days ago

skoob13 commented 3 days ago

Bug Description

Bug description

GET https://eu.posthog.com/api/projects/:team_id/dashboards/:dashboard_id/?refresh=lazy_async fails if the dashboard has an insight with DataTableNode and PersonsNode types.

Response:

{
    "type": "validation_error",
    "code": "invalid_input",
    "detail": "Unsupported query kind: PersonsNode",
    "attr": null
}

How to reproduce

  1. Create an insight with the example query below
  2. Add the insight to a dashboard
  3. Refresh the dashboard and observer the error.

Example query:

{
    "full": true,
    "kind": "DataTableNode",
    "source": {
        "kind": "PersonsNode",
        "properties": [
            {
                "key": "email",
                "type": "person",
                "value": "is_set",
                "operator": "is_set"
            }
        ]
    },
    "propertiesViaUrl": true
}

Additional context

Support Ticket

Debug info

No response