: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): drop product analytics from the joined-mode safeguard allowlist (#90236)
Thomas Obermüller41a5cc142f66
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.ymlindex eda8ef07fbca..8230f1a1c08d 100644--- a/.depot/workflows/ci-backend.yml+++ b/.depot/workflows/ci-backend.yml@@ -2229,7 +2229,7 @@ jobs:if [[ "${{ matrix.compat }}" == "true" ]]; thenfull_targets="$CLICKHOUSE_COMPAT_PYTEST_TARGETS"elif [[ "${{ matrix.person-on-events }}" == "true" ]]; then- full_targets="./posthog/clickhouse/ ./posthog/queries/ ./products/product_analytics/backend/tests/api/ ./posthog/api/test/dashboards/test_dashboard.py ee/clickhouse/"+ full_targets="./posthog/clickhouse/ ./posthog/queries/ ./posthog/api/test/dashboards/test_dashboard.py ee/clickhouse/"full_ignores+=(--ignore=posthog/hogql_queries --ignore=posthog/hogql)fi# shellcheck disable=SC2086diff --git a/.github/scripts/turbo-discover.js b/.github/scripts/turbo-discover.jsindex eccb45c81a65..e4adee82f0a9 100644--- a/.github/scripts/turbo-discover.js+++ b/.github/scripts/turbo-discover.js@@ -862,7 +862,6 @@ const DJANGO_SEGMENTS = {include: ['posthog/clickhouse/','posthog/queries/',- 'products/product_analytics/backend/tests/api/','posthog/api/test/dashboards/test_dashboard.py','ee/clickhouse/',],diff --git a/.github/scripts/turbo-discover.test.js b/.github/scripts/turbo-discover.test.jsindex 69776f696934..6e9e89e979db 100644--- a/.github/scripts/turbo-discover.test.js+++ b/.github/scripts/turbo-discover.test.js@@ -112,6 +112,25 @@ test('the backend test selector routes files with the same partition', () => {assert.deepEqual(sorted([...ignored, ...claimedFromCore]), sorted(DJANGO_SEGMENTS.Core.exclude))})+// CorePOE re-runs a slice of Core under the legacy joined person mode, and Core+// runs the same files under the customer-default mode. A CorePOE path outside+// Core's pool therefore runs in the legacy mode only, so a regression under the+// mode customers use goes uncaught. Product tests belong in the product's own+// turbo lane, which is where that path would otherwise be reaching for coverage.+// An include Core also ignores is no better than one it never listed, so both+// halves have to hold. A Core ignore NESTED inside a CorePOE path needs no check:+// CorePOE's ignores are Core's plus its own, so that subtree is out of both legs.+test("the safeguard allowlist stays inside Core's pool", () => {+ for (const prefix of DJANGO_SEGMENTS.CorePOE.include) {+ const included = DJANGO_SEGMENTS.Core.include.some((include) => prefix.startsWith(include))+ const excluded = DJANGO_SEGMENTS.Core.exclude.some((exclude) => prefix.startsWith(exclude))+ assert.ok(+ included && !excluded,+ `${prefix} is in CorePOE but Core does not run it, so it never runs in the default person mode`+ )+ }+})+// Isolation is the claim that a product can be tested without the Django suite.// A product that ships the contract-check script but no turbo.json of its own// leaves the task on the root definition, whose inputs are its whole backend,diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.ymlindex b147d21210c9..5f5788495788 100644--- a/.github/workflows/ci-backend.yml+++ b/.github/workflows/ci-backend.yml@@ -3275,7 +3275,7 @@ jobs:if [[ "${{ matrix.compat }}" == "true" ]]; thenfull_targets="$CLICKHOUSE_COMPAT_PYTEST_TARGETS"elif [[ "${{ matrix.person-on-events }}" == "true" ]]; then- full_targets="./posthog/clickhouse/ ./posthog/queries/ ./products/product_analytics/backend/tests/api/ ./posthog/api/test/dashboards/test_dashboard.py ee/clickhouse/"+ full_targets="./posthog/clickhouse/ ./posthog/queries/ ./posthog/api/test/dashboards/test_dashboard.py ee/clickhouse/"full_ignores+=(--ignore=posthog/hogql_queries --ignore=posthog/hogql)fi# shellcheck disable=SC2086diff --git a/posthog/test/repo_invariants/test_pytest_module_collisions.py b/posthog/test/repo_invariants/test_pytest_module_collisions.pyindex 3a5a7219b0fd..2d6125cac360 100644--- a/posthog/test/repo_invariants/test_pytest_module_collisions.py+++ b/posthog/test/repo_invariants/test_pytest_module_collisions.py@@ -65,7 +65,6 @@ CI_SESSIONS: dict[str, tuple[tuple[str, ...], tuple[str, ...]]] = {("posthog/clickhouse","posthog/queries",- "products/product_analytics/backend/tests/api","posthog/api/test/dashboards","ee/clickhouse",),diff --git a/tools/snob_backend_test_selection_shadow.py b/tools/snob_backend_test_selection_shadow.pyindex 3d0e5c96c3e1..5375e2527aae 100755--- a/tools/snob_backend_test_selection_shadow.py+++ b/tools/snob_backend_test_selection_shadow.py@@ -609,7 +609,6 @@ _POE_PREFIXES = ("posthog/clickhouse/","posthog/queries/","ee/clickhouse/",- "products/product_analytics/backend/tests/api/",)_CORE_IGNORED_PREFIXES = ("posthog/dags/", "common/hogvm/python/test/", "posthog/test/repo_invariants/")