From 8deaf4e8eaa7921b06052c2f1b4052b12c143ff1 Mon Sep 17 00:00:00 2001 From: Ben White Date: Mon, 19 Jun 2023 13:15:17 +0200 Subject: [PATCH] feat: Swapped to use KAFKA_HOSTS everywhere (#16109) * Swapped to use KAFKA_HOSTS everywhere * Fixed up type of kafka config options and setup separate kafka hosts for blob consumer * allow session recordings to have its own kafka security protocol * remove slash commands from this pr * syntax must be obeyed * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * fix * Update query snapshots * no empty strings in kafka hosts * fix snapshot * fix test --------- Co-authored-by: Paul D'Ambra Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- .devcontainer/devcontainer.json | 2 -- .github/workflows/ci-e2e.yml | 3 +- .run/Celery.run.xml | 2 +- .run/PostHog.run.xml | 5 ++- .vscode/launch.json | 7 ++-- bin/e2e-test-runner | 2 +- bin/plugin-server | 35 +++++++++---------- docker-compose.base.yml | 3 +- plugin-server/src/config/config.ts | 18 +++++----- .../session-recordings-blob-consumer.ts | 8 +++-- plugin-server/src/main/pluginsServer.ts | 4 +-- plugin-server/src/types.ts | 18 +++++----- plugin-server/src/utils/db/hub.ts | 5 ++- posthog/api/capture.py | 5 +-- posthog/api/test/test_capture.py | 13 +++---- posthog/clickhouse/kafka_engine.py | 4 +-- posthog/clickhouse/test/test_schema.py | 2 +- posthog/kafka_client/client.py | 4 +-- posthog/kafka_client/helper.py | 25 ++----------- posthog/models/person_overrides/sql.py | 2 +- posthog/settings/data_stores.py | 29 +++++++++------ posthog/settings/ingestion.py | 10 +++--- 22 files changed, 93 insertions(+), 113 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a4a1be4021..6d11a0970a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,8 +14,6 @@ "DATABASE_URL": "postgres://posthog:posthog@localhost:5432/posthog", "KAFKA_ENABLED": "true", "KAFKA_HOSTS": "kafka:9092", - "KAFKA_URL": "kafka://kafka:9092", - "SESSION_RECORDING_KAFKA_URL": "kafka://kafka:9092", "CLICKHOUST_HOST": "localhost", "CLICKHOUSE_DATABASE": "posthog_test", "CLICKHOUSE_VERIFY": "False", diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index 47553b0728..4f0dd181e1 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -152,8 +152,7 @@ jobs: SECRET_KEY=6b01eee4f945ca25045b5aab440b953461faf08693a9abbf1166dc7c6b9772da REDIS_URL=redis://localhost DATABASE_URL=postgres://posthog:posthog@localhost:5432/posthog - KAFKA_URL=kafka://kafka:9092 - SESSION_RECORDING_KAFKA_URL=kafka://kafka:9092 + KAFKA_HOSTS=kafka:9092 DISABLE_SECURE_SSL_REDIRECT=1 SECURE_COOKIES=0 OPT_OUT_CAPTURE=1 diff --git a/.run/Celery.run.xml b/.run/Celery.run.xml index 91b0cf2c2e..82f170a5fa 100644 --- a/.run/Celery.run.xml +++ b/.run/Celery.run.xml @@ -7,7 +7,7 @@ - + diff --git a/.run/PostHog.run.xml b/.run/PostHog.run.xml index 89139b4232..febd0fb568 100644 --- a/.run/PostHog.run.xml +++ b/.run/PostHog.run.xml @@ -10,12 +10,11 @@ - + - - +