From ceccb49800976dbeabac49f66b5751fc2882026b Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Thu, 1 Aug 2024 13:03:34 +0200 Subject: [PATCH] feat(insights): Make initial single insight load async v2 (#23978) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anirudh Pillai --- .github/workflows/ci-e2e.yml | 2 +- .run/Celery Threads.run.xml | 2 +- .vscode/launch.json | 2 +- bin/e2e-test-runner | 13 +- bin/start-worker | 4 +- cypress.e2e.config.ts | 13 +- cypress/e2e/dashboard.cy.ts | 40 +++ cypress/e2e/insights-saved.cy.ts | 44 +++ cypress/productAnalytics/index.ts | 6 +- cypress/support/e2e.ts | 4 + frontend/src/lib/api.ts | 6 +- .../queries/nodes/DataNode/dataNodeLogic.ts | 14 +- frontend/src/queries/schema.json | 258 +++++++++++++++--- frontend/src/queries/schema.ts | 5 + .../src/scenes/dashboard/dashboardLogic.tsx | 2 +- frontend/src/scenes/insights/insightLogic.tsx | 3 +- posthog/caching/insight_caching_state.py | 2 +- posthog/clickhouse/table_engines.py | 2 +- .../management/commands/migrate_clickhouse.py | 2 +- .../commands/run_autoreload_celery.py | 41 +-- posthog/schema.py | 141 ++++++++++ posthog/settings/base_variables.py | 7 +- 22 files changed, 533 insertions(+), 80 deletions(-) create mode 100644 cypress/e2e/insights-saved.cy.ts diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index c633b70075a..a36a788b35a 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -191,7 +191,7 @@ jobs: OBJECT_STORAGE_SECRET_ACCESS_KEY=object_storage_root_password GITHUB_ACTION_RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" CELERY_METRICS_PORT=8999 - CLOUD_DEPLOYMENT=1 + CLOUD_DEPLOYMENT=E2E EOT - name: Start PostHog diff --git a/.run/Celery Threads.run.xml b/.run/Celery Threads.run.xml index b437920c484..f57ed16d523 100644 --- a/.run/Celery Threads.run.xml +++ b/.run/Celery Threads.run.xml @@ -21,7 +21,7 @@