Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): make E2E Playwright tests work again (#60101)

Robbief35f3b69fe38
diff --git a/.github/workflows/ci-e2e-playwright.yml b/.github/workflows/ci-e2e-playwright.yml
index c48b1f750b95..4e53f4326998 100644
--- a/.github/workflows/ci-e2e-playwright.yml
+++ b/.github/workflows/ci-e2e-playwright.yml
@@ -431,9 +431,10 @@ jobs:
- name: Collect static files
run: |
- # KLUDGE: to get the image-bitmap-data-url-worker-*.js.map files into the dist folder
- # KLUDGE: rrweb thinks they're alongside and the django's collectstatic fails
- cp frontend/node_modules/@posthog/rrweb/dist/image-bitmap-data-url-worker-*.js.map frontend/dist/ && python manage.py collectstatic --noinput
+ # KLUDGE: posthog-js now bundles rrweb and ships image-bitmap-data-url-worker-*.js.map
+ # KLUDGE: under its own dist; the worker references the map alongside, so copy it into
+ # KLUDGE: dist/ or django's collectstatic fails on the missing source map
+ cp frontend/node_modules/posthog-js/dist/image-bitmap-data-url-worker-*.js.map frontend/dist/ && python manage.py collectstatic --noinput
- name: Create test database
shell: bash
run: |
@@ -510,6 +511,13 @@ jobs:
sqlx database create -D "$PERSONS_DATABASE_URL"
sqlx migrate run -D "$PERSONS_DATABASE_URL" --source rust/persons_migrations/
+ # Cyclotron node DB — the plugins container runs the CDP rerun worker
+ # (default capabilities), which requires CYCLOTRON_NODE_DATABASE_URL to point
+ # at a real, migrated database or it throws on startup and the server exits.
+ CYCLOTRON_NODE_DATABASE_URL="postgres://posthog:posthog@localhost:5432/cyclotron_node"
+ sqlx database create -D "$CYCLOTRON_NODE_DATABASE_URL"
+ sqlx migrate run -D "$CYCLOTRON_NODE_DATABASE_URL" --source rust/cyclotron-node-migrations/
+
python manage.py migrate_clickhouse 2>&1
python manage.py setup_dev
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 0c4ebf9a4a47..92591f6a3072 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -154,6 +154,10 @@ services:
environment:
DATABASE_URL: postgres://posthog:posthog@db:5432/${POSTHOG_DB_NAME:-posthog}
PERSONS_DATABASE_URL: postgres://posthog:posthog@db:5432/${POSTHOG_PERSONS_DB_NAME:-posthog}
+ # The plugins container runs the CDP rerun worker (default capabilities), which
+ # requires this. bin/start exports it for local dev; the value below is the default
+ # for callers (like the E2E CI job) that launch this service without bin/start.
+ CYCLOTRON_NODE_DATABASE_URL: ${CYCLOTRON_NODE_DATABASE_URL:-postgres://posthog:posthog@db:5432/cyclotron_node}
CLICKHOUSE_DATABASE: ${CLICKHOUSE_DATABASE:-posthog}
# CDP Redis defaults to 127.0.0.1 — must point to the Docker service
CDP_REDIS_HOST: redis7