posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix(insights): Fall back to dataNodeLogic results

Open webjunkie opened this issue 1 year ago • 2 comments

Problem

We do not make requests to /query endpoint from dashboards (anymore). However, only these would run async. The dataNodeLogic that is responsible would do it, but it gets cached results now and doesn't act even when they are null.

Goal:

  • dashboard loads, insight is empty
  • insight tries to refresh, but this times out, leading to a still empty result
  • dataNodeLogic gets triggered and loads with the async query, possibly succeeding

Changes

  • adjust conditions so that when results are null and and dataNodeLogic doesn't yet have any results, then it loads

DANGER: This is not yet checked for the bug that caused an incident. Somewhere here this leads to the logic aborting queries (sending DELETE requests) before even starting to send the first ones.

Update: Found the culprit. For each insight that has result: null when the dashboard loads, the dataNodeLogic already triggers, which is not what we want. Because it triggers multiple times somehow, it cancels its own queries as well, leading to the DELETE requests.

Does this work well for both Cloud and self-hosted?

n/a

How did you test this code?

tbd

webjunkie avatar May 08 '24 19:05 webjunkie

Size Change: 0 B

Total Size: 1.05 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.05 MB

compressed-size-action

github-actions[bot] avatar May 08 '24 19:05 github-actions[bot]

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar May 16 '24 07:05 posthog-bot

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar May 30 '24 07:05 posthog-bot

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar Jun 07 '24 07:06 posthog-bot

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

posthog-bot avatar Jun 14 '24 07:06 posthog-bot