From 3acdaf10dd10e9cc3722278cef6d2db635714517 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 18 Oct 2023 17:45:57 +0200 Subject: [PATCH 01/39] feat: configure session recording sample rate --- frontend/src/lib/constants.tsx | 1 + .../settings/SessionRecordingSettings.tsx | 44 ++++++++++++++++++- frontend/src/types.ts | 3 ++ latest_migrations.manifest | 2 +- posthog/admin.py | 3 +- posthog/api/decide.py | 1 + posthog/api/team.py | 5 +++ posthog/api/test/test_decide.py | 18 ++++++-- .../migrations/0355_add_replay_sample_rate.py | 29 ++++++++++++ posthog/models/team/team.py | 11 ++++- 10 files changed, 110 insertions(+), 7 deletions(-) create mode 100644 posthog/migrations/0355_add_replay_sample_rate.py diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index fd25cde2002a9..df8c454b52120 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -165,6 +165,7 @@ export const FEATURE_FLAGS = { SURVEYS_NEW_CREATION_FLOW: 'surveys-new-creation-flow', // owner: @liyiy CONSOLE_RECORDING_SEARCH: 'console-recording-search', // owner: #team-monitoring PERSONS_HOGQL_QUERY: 'persons-hogql-query', // owner: @mariusandra + SESSION_RECORDING_SAMPLING: 'session-recording-sampling', // owner: #team-monitoring } as const export type FeatureFlagKey = (typeof FEATURE_FLAGS)[keyof typeof FEATURE_FLAGS] diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 7a949944c1994..9a07c27075057 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -1,11 +1,14 @@ import { useActions, useValues } from 'kea' import { teamLogic } from 'scenes/teamLogic' -import { LemonSwitch, Link } from '@posthog/lemon-ui' +import { LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' import { urls } from 'scenes/urls' import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList' import { AuthorizedUrlListType } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic' import { LemonDialog } from 'lib/lemon-ui/LemonDialog' import { LemonLabel } from 'lib/lemon-ui/LemonLabel/LemonLabel' +import { FlaggedFeature } from 'lib/components/FlaggedFeature' +import { FEATURE_FLAGS } from 'lib/constants' +import { SampleRate } from '~/types' export type SessionRecordingSettingsProps = { inModal?: boolean @@ -102,6 +105,45 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe

+ + <> +
+ Sampling + { + updateCurrentTeam({ session_recording_sample_rate: v as SampleRate }) + }} + options={[ + { + label: '100%', + value: '1.00', + }, + { + label: '75%', + value: '0.75', + }, + { + label: '50%', + value: '0.50', + }, + { + label: '25%', + value: '0.25', + }, + ]} + value={ + (currentTeam?.session_recording_sample_rate === undefined + ? '1.00' + : currentTeam?.session_recording_sample_rate) as SampleRate + } + /> +
+

+ Use this setting to restrict the percentage of sessions that will be recorded. This is useful if + you want to reduce the amount of data you collect. +

+ +
) } diff --git a/frontend/src/types.ts b/frontend/src/types.ts index a1652c4a75eb5..5377666d4e7ce 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -324,6 +324,8 @@ export interface CorrelationConfigType { excluded_event_names?: string[] } +export type SampleRate = '0.25' | '0.5' | '0.75' | '1.0' | undefined + export interface TeamType extends TeamBasicType { created_at: string updated_at: string @@ -335,6 +337,7 @@ export interface TeamType extends TeamBasicType { session_recording_opt_in: boolean capture_console_log_opt_in: boolean capture_performance_opt_in: boolean + session_recording_sample_rate: SampleRate autocapture_exceptions_opt_in: boolean surveys_opt_in?: boolean autocapture_exceptions_errors_to_ignore: string[] diff --git a/latest_migrations.manifest b/latest_migrations.manifest index a09d7f51cf469..60d96abb38437 100644 --- a/latest_migrations.manifest +++ b/latest_migrations.manifest @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name ee: 0015_add_verified_properties otp_static: 0002_throttling otp_totp: 0002_auto_20190420_0723 -posthog: 0354_organization_never_drop_data +posthog: 0355_add_replay_sample_rate sessions: 0001_initial social_django: 0010_uid_db_index two_factor: 0007_auto_20201201_1019 diff --git a/posthog/admin.py b/posthog/admin.py index f1bd8b33ddbaf..864490e7302a7 100644 --- a/posthog/admin.py +++ b/posthog/admin.py @@ -183,7 +183,8 @@ class TeamAdmin(admin.ModelAdmin): "session_recording_opt_in", "capture_console_log_opt_in", "capture_performance_opt_in", - "data_attributes", + "session_recording_sample_rate", + "updateCurrentTeam({ capture_console_log_opt_in: checked })" "data_attributes", "session_recording_version", "access_control", "inject_web_apps", diff --git a/posthog/api/decide.py b/posthog/api/decide.py index 5bd187b819cb7..8e01679ed5977 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -224,6 +224,7 @@ def get_decide(request: HttpRequest): "endpoint": "/s/", "consoleLogRecordingEnabled": capture_console_logs, "recorderVersion": "v2", + "sampleRate": team.session_recording_sample_rate or None, } response["surveys"] = True if team.surveys_opt_in else False diff --git a/posthog/api/team.py b/posthog/api/team.py index ebfd3fe2f72d3..3065350fab3ed 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -75,6 +75,8 @@ class CachingTeamSerializer(serializers.ModelSerializer): Has all parameters needed for a successful decide request. """ + session_recording_sample_rate = serializers.DecimalField(min_value=0, max_value=1, max_digits=3, decimal_places=2) + class Meta: model = Team fields = [ @@ -88,6 +90,7 @@ class Meta: "capture_performance_opt_in", "capture_console_log_opt_in", "session_recording_opt_in", + "session_recording_sample_rate", "recording_domains", "inject_web_apps", "surveys_opt_in", @@ -98,6 +101,7 @@ class TeamSerializer(serializers.ModelSerializer, UserPermissionsSerializerMixin effective_membership_level = serializers.SerializerMethodField() has_group_types = serializers.SerializerMethodField() groups_on_events_querying_enabled = serializers.SerializerMethodField() + session_recording_sample_rate = serializers.DecimalField(min_value=0, max_value=1, max_digits=3, decimal_places=2) class Meta: model = Team @@ -128,6 +132,7 @@ class Meta: "capture_console_log_opt_in", "capture_performance_opt_in", "session_recording_opt_in", + "session_recording_sample_rate", "effective_membership_level", "access_control", "week_start_day", diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 9ca6b3a28f409..9471f6a0e83c6 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -162,6 +162,16 @@ def test_user_performance_opt_in(self, *args): response = self._post_decide().json() self.assertEqual(response["capturePerformance"], True) + def test_session_recording_sample_rate(self, *args): + # :TRICKY: Test for regression around caching + response = self._post_decide().json() + self.assertEqual(response["sampleRate"], None) + + self._update_team({"session_recording_sample_rate": 0.8}) + + response = self._post_decide().json() + self.assertEqual(response["sampleRate"], 0.8) + def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching response = self._post_decide().json() @@ -1759,6 +1769,7 @@ def test_disable_flags(self, *args): def test_decide_doesnt_error_out_when_database_is_down(self, *args): ALL_TEAM_PARAMS_FOR_DECIDE = { "session_recording_opt_in": True, + "session_recording_sample_rate": 0.2, "capture_console_log_opt_in": True, "inject_web_apps": True, "recording_domains": ["https://*.example.com"], @@ -1771,7 +1782,7 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True}, + {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": 0.2}, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) @@ -1785,7 +1796,7 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True}, + {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": 0.2}, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) @@ -2289,6 +2300,7 @@ def test_database_check_doesnt_interfere_with_regular_computation(self, *args): def test_decide_doesnt_error_out_when_database_is_down_and_database_check_isnt_cached(self, *args): ALL_TEAM_PARAMS_FOR_DECIDE = { "session_recording_opt_in": True, + "session_recording_sample_rate": 0.4, "capture_console_log_opt_in": True, "inject_web_apps": True, "recording_domains": ["https://*.example.com"], @@ -2326,7 +2338,7 @@ def test_decide_doesnt_error_out_when_database_is_down_and_database_check_isnt_c self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True}, + {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": 0.4}, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) diff --git a/posthog/migrations/0355_add_replay_sample_rate.py b/posthog/migrations/0355_add_replay_sample_rate.py new file mode 100644 index 0000000000000..efd4171fc84b6 --- /dev/null +++ b/posthog/migrations/0355_add_replay_sample_rate.py @@ -0,0 +1,29 @@ +# Generated by Django 3.2.19 on 2023-10-18 15:11 + +from decimal import Decimal +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("posthog", "0354_organization_never_drop_data"), + ] + + operations = [ + migrations.AddField( + model_name="team", + name="session_recording_sample_rate", + field=models.DecimalField( + blank=True, + decimal_places=2, + max_digits=3, + null=True, + validators=[ + django.core.validators.MinValueValidator(Decimal("0")), + django.core.validators.MaxValueValidator(Decimal("1")), + ], + ), + ), + ] diff --git a/posthog/models/team/team.py b/posthog/models/team/team.py index 73f1231d33bb0..a602da318b913 100644 --- a/posthog/models/team/team.py +++ b/posthog/models/team/team.py @@ -1,4 +1,5 @@ import re +from decimal import Decimal from functools import lru_cache from typing import Any, Dict, List, Optional @@ -6,7 +7,7 @@ import pytz from django.conf import settings from django.contrib.postgres.fields import ArrayField -from django.core.validators import MinLengthValidator +from django.core.validators import MinLengthValidator, MaxValueValidator, MinValueValidator from django.db import models from django.db.models.signals import post_delete, post_save from zoneinfo import ZoneInfo @@ -148,6 +149,14 @@ class Team(UUIDClassicModel): autocapture_exceptions_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) autocapture_exceptions_errors_to_ignore: models.JSONField = models.JSONField(null=True, blank=True) session_recording_opt_in: models.BooleanField = models.BooleanField(default=False) + session_recording_sample_rate: models.DecimalField = models.DecimalField( + # will store a decimal between 0 and 1 allowing up to 2 decimal places + null=True, + blank=True, + max_digits=3, + decimal_places=2, + validators=[MinValueValidator(Decimal(0)), MaxValueValidator(Decimal(1))], + ) capture_console_log_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) capture_performance_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) surveys_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) From b70ec1a52a1075f74d20528b81f7b7f2cbadfd11 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 18 Oct 2023 18:03:20 +0200 Subject: [PATCH 02/39] fix mock --- frontend/src/lib/api.mock.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/lib/api.mock.ts b/frontend/src/lib/api.mock.ts index b2059e46b436c..c51de9249ab7d 100644 --- a/frontend/src/lib/api.mock.ts +++ b/frontend/src/lib/api.mock.ts @@ -67,6 +67,7 @@ export const MOCK_DEFAULT_TEAM: TeamType = { }, autocapture_opt_out: true, session_recording_opt_in: true, + session_recording_sample_rate: '1.0', capture_console_log_opt_in: true, capture_performance_opt_in: true, autocapture_exceptions_opt_in: false, From 24084c13183c697fc8fd7ae85e7c82415831fd7b Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:05:53 +0000 Subject: [PATCH 03/39] Update query snapshots --- posthog/models/filters/test/__snapshots__/test_filter.ambr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/posthog/models/filters/test/__snapshots__/test_filter.ambr b/posthog/models/filters/test/__snapshots__/test_filter.ambr index 063698d3c2bc1..059524608acc2 100644 --- a/posthog/models/filters/test/__snapshots__/test_filter.ambr +++ b/posthog/models/filters/test/__snapshots__/test_filter.ambr @@ -17,6 +17,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -69,6 +70,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -121,6 +123,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -173,6 +176,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -225,6 +229,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From db33638c533fae874393925735087b2b0b0b50c6 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:09:12 +0000 Subject: [PATCH 04/39] Update query snapshots --- posthog/test/__snapshots__/test_feature_flag.ambr | 1 + 1 file changed, 1 insertion(+) diff --git a/posthog/test/__snapshots__/test_feature_flag.ambr b/posthog/test/__snapshots__/test_feature_flag.ambr index 84422798972fb..2b32e89e7ca13 100644 --- a/posthog/test/__snapshots__/test_feature_flag.ambr +++ b/posthog/test/__snapshots__/test_feature_flag.ambr @@ -17,6 +17,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From bc0142b839c350bd6f58fe4cfa63effc08f618bb Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:14:21 +0000 Subject: [PATCH 05/39] Update query snapshots --- .../test_session_recordings.ambr | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr index 37fec24061764..3329a6251185a 100644 --- a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr +++ b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr @@ -46,6 +46,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -194,6 +195,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -275,6 +277,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -565,6 +568,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -646,6 +650,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -935,6 +940,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1016,6 +1022,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1146,6 +1153,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1340,6 +1348,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1450,6 +1459,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1602,6 +1612,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1769,6 +1780,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1850,6 +1862,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2380,6 +2393,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2461,6 +2475,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2743,6 +2758,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2824,6 +2840,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3097,6 +3114,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3189,6 +3207,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3464,6 +3483,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3545,6 +3565,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From a3f171ac3d86525f674d908cd799a596d431b48d Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 18 Oct 2023 18:09:35 +0200 Subject: [PATCH 06/39] fix --- .../__snapshots__/verifiedDomainsLogic.test.ts.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap b/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap index f7d5211660f41..5c49f8cfe384a 100644 --- a/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap +++ b/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap @@ -75,6 +75,7 @@ exports[`verifiedDomainsLogic values has proper defaults 1`] = ` "https://recordings.posthog.com/", ], "session_recording_opt_in": true, + "session_recording_sample_rate": "1.0", "slack_incoming_webhook": "", "test_account_filters": [ { From 1a080c7ea9ed0427b430a003590c24e6a7446966 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 18 Oct 2023 21:59:11 +0200 Subject: [PATCH 07/39] fix --- posthog/api/team.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/posthog/api/team.py b/posthog/api/team.py index 3065350fab3ed..3f916da194f49 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -75,7 +75,9 @@ class CachingTeamSerializer(serializers.ModelSerializer): Has all parameters needed for a successful decide request. """ - session_recording_sample_rate = serializers.DecimalField(min_value=0, max_value=1, max_digits=3, decimal_places=2) + session_recording_sample_rate = serializers.DecimalField( + min_value=0, max_value=1, max_digits=3, decimal_places=2, required=False + ) class Meta: model = Team @@ -101,7 +103,9 @@ class TeamSerializer(serializers.ModelSerializer, UserPermissionsSerializerMixin effective_membership_level = serializers.SerializerMethodField() has_group_types = serializers.SerializerMethodField() groups_on_events_querying_enabled = serializers.SerializerMethodField() - session_recording_sample_rate = serializers.DecimalField(min_value=0, max_value=1, max_digits=3, decimal_places=2) + session_recording_sample_rate = serializers.DecimalField( + min_value=0, max_value=1, max_digits=3, decimal_places=2, required=False + ) class Meta: model = Team From 76d07f6055ce73195d8b9c8d91a1a047a362dbc3 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:12:08 +0000 Subject: [PATCH 08/39] Update query snapshots --- .../test/__snapshots__/test_preflight.ambr | 1 + .../api/test/__snapshots__/test_survey.ambr | 1 + .../__snapshots__/test_dashboard.ambr | 73 +++++++++++++++++++ .../__snapshots__/test_notebook.ambr | 7 ++ 4 files changed, 82 insertions(+) diff --git a/posthog/api/test/__snapshots__/test_preflight.ambr b/posthog/api/test/__snapshots__/test_preflight.ambr index 6981b2f9afe16..faf3d0d1809d3 100644 --- a/posthog/api/test/__snapshots__/test_preflight.ambr +++ b/posthog/api/test/__snapshots__/test_preflight.ambr @@ -57,6 +57,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_survey.ambr b/posthog/api/test/__snapshots__/test_survey.ambr index dbb2f09b058c3..8c409ed786659 100644 --- a/posthog/api/test/__snapshots__/test_survey.ambr +++ b/posthog/api/test/__snapshots__/test_survey.ambr @@ -103,6 +103,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index 51a2d1a06857d..d45ca6c5c11fe 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -46,6 +46,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -166,6 +167,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -281,6 +283,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -487,6 +490,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -648,6 +652,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -821,6 +826,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -980,6 +986,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1214,6 +1221,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1266,6 +1274,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1416,6 +1425,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1521,6 +1531,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1573,6 +1584,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1721,6 +1733,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1842,6 +1855,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2097,6 +2111,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2332,6 +2347,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2455,6 +2471,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2570,6 +2587,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2684,6 +2702,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2778,6 +2797,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2923,6 +2943,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3014,6 +3035,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3132,6 +3154,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3250,6 +3273,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3379,6 +3403,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3694,6 +3719,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3847,6 +3873,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3976,6 +4003,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4056,6 +4084,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4212,6 +4241,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4264,6 +4294,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4382,6 +4413,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4527,6 +4559,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4947,6 +4980,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5083,6 +5117,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5163,6 +5198,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5281,6 +5317,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5360,6 +5397,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5412,6 +5450,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5530,6 +5569,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5665,6 +5705,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5822,6 +5863,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6224,6 +6266,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6368,6 +6411,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6544,6 +6588,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6705,6 +6750,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6839,6 +6885,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6923,6 +6970,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7082,6 +7130,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7717,6 +7766,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7962,6 +8012,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8118,6 +8169,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8170,6 +8222,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8288,6 +8341,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8433,6 +8487,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8551,6 +8606,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8681,6 +8737,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8816,6 +8873,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9120,6 +9178,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9269,6 +9328,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9368,6 +9428,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9492,6 +9553,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9613,6 +9675,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9739,6 +9802,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9915,6 +9979,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10067,6 +10132,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10165,6 +10231,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10320,6 +10387,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10493,6 +10561,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10598,6 +10667,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10753,6 +10823,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10887,6 +10958,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -11092,6 +11164,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr index 31f6729e6e9a7..b5b5e3d5f3976 100644 --- a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr +++ b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr @@ -46,6 +46,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -131,6 +132,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -183,6 +185,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -294,6 +297,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -501,6 +505,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -599,6 +604,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -701,6 +707,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From 93a0e6c9d9d2d3846e2f9aa45eaedf5e88cdf0e5 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 18 Oct 2023 22:20:56 +0200 Subject: [PATCH 09/39] fix --- posthog/api/team.py | 7 ------- posthog/api/test/test_team.py | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/posthog/api/team.py b/posthog/api/team.py index 3f916da194f49..d2ad3f538233b 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -75,10 +75,6 @@ class CachingTeamSerializer(serializers.ModelSerializer): Has all parameters needed for a successful decide request. """ - session_recording_sample_rate = serializers.DecimalField( - min_value=0, max_value=1, max_digits=3, decimal_places=2, required=False - ) - class Meta: model = Team fields = [ @@ -103,9 +99,6 @@ class TeamSerializer(serializers.ModelSerializer, UserPermissionsSerializerMixin effective_membership_level = serializers.SerializerMethodField() has_group_types = serializers.SerializerMethodField() groups_on_events_querying_enabled = serializers.SerializerMethodField() - session_recording_sample_rate = serializers.DecimalField( - min_value=0, max_value=1, max_digits=3, decimal_places=2, required=False - ) class Meta: model = Team diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index a32f6cc63444e..f3797c3eb255c 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -4,6 +4,7 @@ from asgiref.sync import sync_to_async from django.core.cache import cache +from parameterized import parameterized from rest_framework import status from temporalio.service import RPCError @@ -485,6 +486,26 @@ def test_configure_exception_autocapture_event_dropping_only_allows_simple_confi == "Field autocapture_exceptions_errors_to_ignore must be less than 300 characters. Complex config should be provided in posthog-js initialization." ) + @parameterized.expand( + [ + ["non numeric string", "Welwyn Garden City", "invalid_input", "A valid number is required."], + ["negative number", "-1", "min_value", "Ensure this value is greater than or equal to 0."], + ["greater than one", "1.5", "max_value", "Ensure this value is less than or equal to 1."], + ["too many digits", "0.534", "max_decimal_places", "Ensure that there are no more than 2 decimal places."], + ] + ) + def test_invalid_session_recording_sample_rates( + self, _name: str, provided_value: str, expected_code: str, expected_error: str + ) -> None: + response = self.client.patch("/api/projects/@current/", {"session_recording_sample_rate": provided_value}) + assert response.status_code == status.HTTP_400_BAD_REQUEST + assert response.json() == { + "attr": "session_recording_sample_rate", + "code": expected_code, + "detail": expected_error, + "type": "validation_error", + } + def create_team(organization: Organization, name: str = "Test team") -> Team: """ From 1440392205f771561d02445ec9050f7216d4b6cf Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Thu, 19 Oct 2023 01:17:45 +0200 Subject: [PATCH 10/39] fix --- .../api/test/__snapshots__/test_decide.ambr | 41 +++++----- posthog/api/test/test_decide.py | 79 ++++++++++++------- 2 files changed, 69 insertions(+), 51 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index 374bd99238f7e..0e86aa118820f 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -46,6 +46,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -126,6 +127,17 @@ ' --- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.3 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT (1) AS "a" FROM "posthog_grouptypemapping" @@ -133,7 +145,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -144,7 +156,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -155,7 +167,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -166,7 +178,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -195,7 +207,7 @@ LIMIT 21 ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 ' SELECT "posthog_featureflag"."id", "posthog_featureflag"."key", @@ -218,22 +230,6 @@ AND "posthog_featureflag"."team_id" = 2) ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 - ' - SELECT "posthog_pluginconfig"."id", - "posthog_pluginconfig"."web_token", - "posthog_pluginsourcefile"."updated_at", - "posthog_plugin"."updated_at", - "posthog_pluginconfig"."updated_at" - FROM "posthog_pluginconfig" - INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") - INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") - WHERE ("posthog_pluginconfig"."enabled" - AND "posthog_pluginsourcefile"."filename" = 'site.ts' - AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' - AND "posthog_pluginconfig"."team_id" = 2) - ' ---- # name: TestDecide.test_flag_with_behavioural_cohorts ' SELECT "posthog_user"."id", @@ -282,6 +278,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -432,6 +429,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -577,6 +575,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 9471f6a0e83c6..38c0cce8a87cf 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -133,10 +133,12 @@ def test_user_session_recording_opt_in(self, *args): self._update_team({"session_recording_opt_in": True}) response = self._post_decide().json() - self.assertEqual( - response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": False}, - ) + assert response["sessionRecording"] == { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": False, + "sampleRate": None, + } self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) def test_user_console_log_opt_in(self, *args): @@ -147,10 +149,12 @@ def test_user_console_log_opt_in(self, *args): self._update_team({"session_recording_opt_in": True, "capture_console_log_opt_in": True}) response = self._post_decide().json() - self.assertEqual( - response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True}, - ) + assert response["sessionRecording"] == { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": True, + "sampleRate": None, + } def test_user_performance_opt_in(self, *args): # :TRICKY: Test for regression around caching @@ -164,13 +168,20 @@ def test_user_performance_opt_in(self, *args): def test_session_recording_sample_rate(self, *args): # :TRICKY: Test for regression around caching + + self._update_team( + { + "session_recording_opt_in": True, + } + ) + response = self._post_decide().json() - self.assertEqual(response["sampleRate"], None) + assert response["sessionRecording"]["sampleRate"] is None self._update_team({"session_recording_sample_rate": 0.8}) response = self._post_decide().json() - self.assertEqual(response["sampleRate"], 0.8) + self.assertEqual(response["sessionRecording"]["sampleRate"], "0.80") def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching @@ -206,10 +217,12 @@ def test_user_session_recording_opt_in_wildcard_domain(self, *args): self._update_team({"session_recording_opt_in": True, "recording_domains": ["https://*.example.com"]}) response = self._post_decide(origin="https://random.example.com").json() - self.assertEqual( - response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": False}, - ) + assert response["sessionRecording"] == { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": False, + "sampleRate": None, + } self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) # Make sure the domain matches exactly @@ -220,13 +233,15 @@ def test_user_session_recording_evil_site(self, *args): self._update_team({"session_recording_opt_in": True, "recording_domains": ["https://example.com"]}) response = self._post_decide(origin="evil.site.com").json() - self.assertEqual(response["sessionRecording"], False) + assert response["sessionRecording"] is False response = self._post_decide(origin="https://example.com").json() - self.assertEqual( - response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": False}, - ) + assert response["sessionRecording"] == { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": False, + "sampleRate": None, + } def test_user_autocapture_opt_out(self, *args): # :TRICKY: Test for regression around caching @@ -242,19 +257,23 @@ def test_user_session_recording_allowed_when_no_permitted_domains_are_set(self, self._update_team({"session_recording_opt_in": True, "recording_domains": []}) response = self._post_decide(origin="any.site.com").json() - self.assertEqual( - response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": False}, - ) + assert response["sessionRecording"] == { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": False, + "sampleRate": None, + } def test_user_session_recording_allowed_when_permitted_domains_are_not_http_based(self, *args): self._update_team({"session_recording_opt_in": True, "recording_domains": ["capacitor://localhost"]}) response = self._post_decide(origin="capacitor://localhost:8000/home").json() - self.assertEqual( - response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": False}, - ) + assert response["sessionRecording"] == { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": False, + "sampleRate": None, + } @snapshot_postgres_queries def test_web_app_queries(self, *args): @@ -1782,7 +1801,7 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": 0.2}, + {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": "0.20"}, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) @@ -1796,7 +1815,7 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": 0.2}, + {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": "0.20"}, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) @@ -2338,7 +2357,7 @@ def test_decide_doesnt_error_out_when_database_is_down_and_database_check_isnt_c self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": 0.4}, + {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": "0.40"}, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) From 9116ff0a8a3c3a502bc8bc2250d6b4092a4503db Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 23:31:42 +0000 Subject: [PATCH 11/39] Update query snapshots --- .../api/test/__snapshots__/test_action.ambr | 3 ++ .../test/__snapshots__/test_annotation.ambr | 3 ++ .../api/test/__snapshots__/test_decide.ambr | 37 +++++++++++-------- .../test_early_access_feature.ambr | 2 + .../api/test/__snapshots__/test_element.ambr | 1 + .../api/test/__snapshots__/test_insight.ambr | 11 ++++++ 6 files changed, 41 insertions(+), 16 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_action.ambr b/posthog/api/test/__snapshots__/test_action.ambr index 74a0af87a8f76..38ada81e51ecb 100644 --- a/posthog/api/test/__snapshots__/test_action.ambr +++ b/posthog/api/test/__snapshots__/test_action.ambr @@ -46,6 +46,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -196,6 +197,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -517,6 +519,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_annotation.ambr b/posthog/api/test/__snapshots__/test_annotation.ambr index 45bd7cfb775ac..8364965c89ea5 100644 --- a/posthog/api/test/__snapshots__/test_annotation.ambr +++ b/posthog/api/test/__snapshots__/test_annotation.ambr @@ -46,6 +46,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -120,6 +121,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -439,6 +441,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index 0e86aa118820f..dc9b11e82ffe5 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -127,17 +127,6 @@ ' --- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.3 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT (1) AS "a" FROM "posthog_grouptypemapping" @@ -145,7 +134,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -156,7 +145,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -167,7 +156,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -178,7 +167,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -207,7 +196,7 @@ LIMIT 21 ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 ' SELECT "posthog_featureflag"."id", "posthog_featureflag"."key", @@ -230,6 +219,22 @@ AND "posthog_featureflag"."team_id" = 2) ' --- +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 + ' + SELECT "posthog_pluginconfig"."id", + "posthog_pluginconfig"."web_token", + "posthog_pluginsourcefile"."updated_at", + "posthog_plugin"."updated_at", + "posthog_pluginconfig"."updated_at" + FROM "posthog_pluginconfig" + INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") + INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") + WHERE ("posthog_pluginconfig"."enabled" + AND "posthog_pluginsourcefile"."filename" = 'site.ts' + AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' + AND "posthog_pluginconfig"."team_id" = 2) + ' +--- # name: TestDecide.test_flag_with_behavioural_cohorts ' SELECT "posthog_user"."id", diff --git a/posthog/api/test/__snapshots__/test_early_access_feature.ambr b/posthog/api/test/__snapshots__/test_early_access_feature.ambr index f9cfe83157dc4..6a0c49996839a 100644 --- a/posthog/api/test/__snapshots__/test_early_access_feature.ambr +++ b/posthog/api/test/__snapshots__/test_early_access_feature.ambr @@ -17,6 +17,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -144,6 +145,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_element.ambr b/posthog/api/test/__snapshots__/test_element.ambr index 31197b2863bf8..e7e08174c0f92 100644 --- a/posthog/api/test/__snapshots__/test_element.ambr +++ b/posthog/api/test/__snapshots__/test_element.ambr @@ -46,6 +46,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_insight.ambr b/posthog/api/test/__snapshots__/test_insight.ambr index 6dfedeac24979..1625a7880819d 100644 --- a/posthog/api/test/__snapshots__/test_insight.ambr +++ b/posthog/api/test/__snapshots__/test_insight.ambr @@ -644,6 +644,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -689,6 +690,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -810,6 +812,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1035,6 +1038,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1172,6 +1176,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1294,6 +1299,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1397,6 +1403,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1535,6 +1542,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1615,6 +1623,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1694,6 +1703,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1746,6 +1756,7 @@ "posthog_team"."autocapture_exceptions_opt_in", "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", + "posthog_team"."session_recording_sample_rate", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From 3d02cd32f94aad12357e79bd51acf17ed8fd4744 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 23:49:18 +0000 Subject: [PATCH 12/39] Update query snapshots --- .../__snapshots__/test_dashboard.ambr | 461 +++++++++--------- 1 file changed, 236 insertions(+), 225 deletions(-) diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index d45ca6c5c11fe..29f48907e59f2 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -5075,6 +5075,17 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.200 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.201 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5098,7 +5109,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.201 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.202 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5144,7 +5155,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.202 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.203 ' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -5179,7 +5190,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.203 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.204 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5232,24 +5243,13 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.204 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ - ' ---- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.205 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5260,7 +5260,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5271,7 +5271,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5282,7 +5282,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5293,7 +5293,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5352,6 +5352,17 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.210 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.211 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5378,7 +5389,7 @@ 5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.211 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.212 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5431,7 +5442,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.212 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.213 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5484,7 +5495,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.213 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.214 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5495,7 +5506,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.214 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.215 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5506,7 +5517,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.215 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.216 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5517,7 +5528,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.216 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.217 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5528,7 +5539,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.217 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.218 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5539,7 +5550,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.218 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.219 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5550,7 +5561,21 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.219 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22 + ' + SELECT "posthog_sharingconfiguration"."id", + "posthog_sharingconfiguration"."team_id", + "posthog_sharingconfiguration"."dashboard_id", + "posthog_sharingconfiguration"."insight_id", + "posthog_sharingconfiguration"."recording_id", + "posthog_sharingconfiguration"."created_at", + "posthog_sharingconfiguration"."enabled", + "posthog_sharingconfiguration"."access_token" + FROM "posthog_sharingconfiguration" + WHERE "posthog_sharingconfiguration"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.220 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5596,21 +5621,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22 - ' - SELECT "posthog_sharingconfiguration"."id", - "posthog_sharingconfiguration"."team_id", - "posthog_sharingconfiguration"."dashboard_id", - "posthog_sharingconfiguration"."insight_id", - "posthog_sharingconfiguration"."recording_id", - "posthog_sharingconfiguration"."created_at", - "posthog_sharingconfiguration"."enabled", - "posthog_sharingconfiguration"."access_token" - FROM "posthog_sharingconfiguration" - WHERE "posthog_sharingconfiguration"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.220 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.221 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -5628,7 +5639,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.221 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.222 ' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -5663,7 +5674,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.222 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.223 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5686,7 +5697,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.223 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.224 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5739,24 +5750,13 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.224 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ - ' ---- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.225 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5767,7 +5767,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5778,7 +5778,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5789,7 +5789,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5800,7 +5800,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' @@ -5964,6 +5964,17 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.230 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.231 ' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -5987,7 +5998,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.231 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.232 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -6011,7 +6022,7 @@ AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.232 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.233 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6032,7 +6043,7 @@ AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.233 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.234 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6043,7 +6054,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.234 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.235 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6054,7 +6065,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.235 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.236 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6065,7 +6076,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.236 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.237 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6076,7 +6087,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.237 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.238 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6087,7 +6098,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.238 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.239 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6098,7 +6109,15 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.239 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24 + ' + SELECT "posthog_tag"."name" + FROM "posthog_taggeditem" + INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id") + WHERE "posthog_taggeditem"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.240 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6109,15 +6128,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24 - ' - SELECT "posthog_tag"."name" - FROM "posthog_taggeditem" - INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id") - WHERE "posthog_taggeditem"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.240 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.241 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6128,7 +6139,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.241 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.242 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6139,7 +6150,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.242 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.243 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6150,7 +6161,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.243 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.244 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6161,7 +6172,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.244 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.245 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6172,7 +6183,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.245 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.246 ' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -6183,7 +6194,7 @@ AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.246 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.247 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -6210,7 +6221,7 @@ 5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.247 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.248 ' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -6218,7 +6229,7 @@ WHERE "posthog_taggeditem"."insight_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.248 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.249 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -6247,7 +6258,36 @@ LIMIT 21 /**/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.249 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25 + ' + SELECT "posthog_user"."id", + "posthog_user"."password", + "posthog_user"."last_login", + "posthog_user"."first_name", + "posthog_user"."last_name", + "posthog_user"."is_staff", + "posthog_user"."is_active", + "posthog_user"."date_joined", + "posthog_user"."uuid", + "posthog_user"."current_organization_id", + "posthog_user"."current_team_id", + "posthog_user"."email", + "posthog_user"."pending_email", + "posthog_user"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."email_opt_in", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."events_column_config" + FROM "posthog_user" + WHERE "posthog_user"."id" = 2 + LIMIT 21 /**/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.250 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -6293,36 +6333,7 @@ LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25 - ' - SELECT "posthog_user"."id", - "posthog_user"."password", - "posthog_user"."last_login", - "posthog_user"."first_name", - "posthog_user"."last_name", - "posthog_user"."is_staff", - "posthog_user"."is_active", - "posthog_user"."date_joined", - "posthog_user"."uuid", - "posthog_user"."current_organization_id", - "posthog_user"."current_team_id", - "posthog_user"."email", - "posthog_user"."pending_email", - "posthog_user"."temporary_token", - "posthog_user"."distinct_id", - "posthog_user"."is_email_verified", - "posthog_user"."has_seen_product_intro_for", - "posthog_user"."email_opt_in", - "posthog_user"."partial_notification_settings", - "posthog_user"."anonymize_data", - "posthog_user"."toolbar_mode", - "posthog_user"."events_column_config" - FROM "posthog_user" - WHERE "posthog_user"."id" = 2 - LIMIT 21 /**/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.250 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.251 ' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -6352,7 +6363,7 @@ WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.251 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.252 ' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -6376,7 +6387,7 @@ LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.252 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.253 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -6490,7 +6501,7 @@ LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.253 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.254 ' SELECT "posthog_taggeditem"."id", "posthog_taggeditem"."tag_id", @@ -6512,7 +6523,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.254 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.255 ' SELECT "posthog_sharingconfiguration"."id", "posthog_sharingconfiguration"."team_id", @@ -6530,7 +6541,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.255 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.256 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6693,7 +6704,7 @@ ORDER BY "posthog_dashboarditem"."order" ASC /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.256 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.257 ' SELECT "posthog_insightcachingstate"."id", "posthog_insightcachingstate"."team_id", @@ -6714,7 +6725,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.257 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.258 ' SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id", "posthog_dashboard"."id", @@ -6815,7 +6826,7 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.258 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.259 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6840,32 +6851,6 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.259 - ' - SELECT "posthog_dashboard"."id", - "posthog_dashboard"."name", - "posthog_dashboard"."description", - "posthog_dashboard"."team_id", - "posthog_dashboard"."pinned", - "posthog_dashboard"."created_at", - "posthog_dashboard"."created_by_id", - "posthog_dashboard"."deleted", - "posthog_dashboard"."last_accessed_at", - "posthog_dashboard"."filters", - "posthog_dashboard"."creation_mode", - "posthog_dashboard"."restriction_level", - "posthog_dashboard"."deprecated_tags", - "posthog_dashboard"."tags", - "posthog_dashboard"."share_token", - "posthog_dashboard"."is_shared" - FROM "posthog_dashboard" - WHERE "posthog_dashboard"."id" IN (1, - 2, - 3, - 4, - 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.26 ' SELECT "posthog_team"."id", @@ -6913,6 +6898,32 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.260 + ' + SELECT "posthog_dashboard"."id", + "posthog_dashboard"."name", + "posthog_dashboard"."description", + "posthog_dashboard"."team_id", + "posthog_dashboard"."pinned", + "posthog_dashboard"."created_at", + "posthog_dashboard"."created_by_id", + "posthog_dashboard"."deleted", + "posthog_dashboard"."last_accessed_at", + "posthog_dashboard"."filters", + "posthog_dashboard"."creation_mode", + "posthog_dashboard"."restriction_level", + "posthog_dashboard"."deprecated_tags", + "posthog_dashboard"."tags", + "posthog_dashboard"."share_token", + "posthog_dashboard"."is_shared" + FROM "posthog_dashboard" + WHERE "posthog_dashboard"."id" IN (1, + 2, + 3, + 4, + 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.261 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -7073,7 +7084,7 @@ ORDER BY "posthog_dashboarditem"."order" ASC /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.261 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.262 ' SELECT "posthog_insightcachingstate"."id", "posthog_insightcachingstate"."team_id", @@ -7094,7 +7105,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.262 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.263 ' SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id", "posthog_dashboard"."id", @@ -7195,7 +7206,7 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.263 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.264 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -7220,7 +7231,7 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.264 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.265 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7246,7 +7257,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.265 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.266 ' SELECT "posthog_taggeditem"."id", "posthog_taggeditem"."tag_id", @@ -7268,24 +7279,13 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.266 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.267 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7296,7 +7296,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7307,7 +7307,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7348,7 +7348,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7359,7 +7359,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7370,7 +7370,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7381,7 +7381,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7392,7 +7392,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7403,7 +7403,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7414,7 +7414,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7425,12 +7425,23 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.278 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.279 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7457,17 +7468,6 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.279 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.28 ' SELECT "posthog_dashboard"."id", @@ -7498,7 +7498,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7509,7 +7509,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7520,7 +7520,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7531,7 +7531,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7542,7 +7542,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7553,7 +7553,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7564,7 +7564,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7575,7 +7575,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7586,7 +7586,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7597,7 +7597,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7632,7 +7632,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7643,7 +7643,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7654,7 +7654,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7665,7 +7665,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7676,7 +7676,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7687,7 +7687,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7698,7 +7698,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7709,7 +7709,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7720,7 +7720,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7731,7 +7731,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7799,7 +7799,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7810,7 +7810,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7821,7 +7821,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7832,7 +7832,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7843,7 +7843,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7854,7 +7854,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7865,7 +7865,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7876,7 +7876,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7887,7 +7887,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7898,7 +7898,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7944,7 +7944,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7955,7 +7955,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7966,7 +7966,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7977,12 +7977,23 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.314 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.315 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", From 8c0bda7d5ee144897b02ff35a07e022a10b174cb Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:12:27 +0000 Subject: [PATCH 13/39] Update query snapshots --- .../__snapshots__/test_dashboard.ambr | 452 +++++++++--------- 1 file changed, 226 insertions(+), 226 deletions(-) diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index 29f48907e59f2..f809d8b6f551f 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -5075,17 +5075,6 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.200 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.201 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5109,7 +5098,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.202 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.201 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5155,7 +5144,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.203 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.202 ' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -5190,7 +5179,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.204 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.203 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5243,7 +5232,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.205 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.204 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5254,7 +5243,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.206 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.205 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5265,7 +5254,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.207 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.206 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5276,7 +5265,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.208 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.207 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5287,7 +5276,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.209 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.208 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5298,6 +5287,17 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.209 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + ' +--- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.21 ' SELECT "posthog_team"."id", @@ -5352,17 +5352,6 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.210 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.211 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5389,7 +5378,7 @@ 5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.212 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.211 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5442,7 +5431,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.213 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.212 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5495,7 +5484,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.214 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.213 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5506,7 +5495,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.215 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.214 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5517,7 +5506,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.216 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.215 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5528,7 +5517,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.217 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.216 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5539,7 +5528,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.218 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.217 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5550,7 +5539,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.219 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.218 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5561,21 +5550,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22 - ' - SELECT "posthog_sharingconfiguration"."id", - "posthog_sharingconfiguration"."team_id", - "posthog_sharingconfiguration"."dashboard_id", - "posthog_sharingconfiguration"."insight_id", - "posthog_sharingconfiguration"."recording_id", - "posthog_sharingconfiguration"."created_at", - "posthog_sharingconfiguration"."enabled", - "posthog_sharingconfiguration"."access_token" - FROM "posthog_sharingconfiguration" - WHERE "posthog_sharingconfiguration"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.220 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.219 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5621,7 +5596,21 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.221 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22 + ' + SELECT "posthog_sharingconfiguration"."id", + "posthog_sharingconfiguration"."team_id", + "posthog_sharingconfiguration"."dashboard_id", + "posthog_sharingconfiguration"."insight_id", + "posthog_sharingconfiguration"."recording_id", + "posthog_sharingconfiguration"."created_at", + "posthog_sharingconfiguration"."enabled", + "posthog_sharingconfiguration"."access_token" + FROM "posthog_sharingconfiguration" + WHERE "posthog_sharingconfiguration"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.220 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -5639,7 +5628,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.222 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.221 ' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -5674,7 +5663,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.223 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.222 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5697,7 +5686,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.224 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.223 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5750,7 +5739,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.225 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.224 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5761,7 +5750,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.226 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.225 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5772,7 +5761,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.227 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.226 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5783,7 +5772,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.228 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.227 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5794,7 +5783,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.229 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.228 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5805,6 +5794,17 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.229 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + ' +--- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.23 ' SELECT "posthog_dashboardtile"."id", @@ -5964,17 +5964,6 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.230 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.231 ' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -5998,7 +5987,7 @@ LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.232 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.231 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -6022,7 +6011,7 @@ AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.233 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.232 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6043,7 +6032,7 @@ AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.234 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.233 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6054,7 +6043,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.235 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.234 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6065,7 +6054,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.236 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.235 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6076,7 +6065,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.237 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.236 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6087,7 +6076,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.238 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.237 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6098,7 +6087,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.239 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.238 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6109,15 +6098,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24 - ' - SELECT "posthog_tag"."name" - FROM "posthog_taggeditem" - INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id") - WHERE "posthog_taggeditem"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.240 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.239 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6128,7 +6109,15 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.241 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24 + ' + SELECT "posthog_tag"."name" + FROM "posthog_taggeditem" + INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id") + WHERE "posthog_taggeditem"."dashboard_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.240 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6139,7 +6128,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.242 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.241 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6150,7 +6139,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.243 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.242 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6161,7 +6150,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.244 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.243 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6172,7 +6161,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.245 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.244 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6183,7 +6172,7 @@ LIMIT 1 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.246 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.245 ' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -6194,7 +6183,7 @@ AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.247 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.246 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -6221,7 +6210,7 @@ 5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.248 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.247 ' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -6229,36 +6218,7 @@ WHERE "posthog_taggeditem"."insight_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.249 - ' - SELECT "posthog_user"."id", - "posthog_user"."password", - "posthog_user"."last_login", - "posthog_user"."first_name", - "posthog_user"."last_name", - "posthog_user"."is_staff", - "posthog_user"."is_active", - "posthog_user"."date_joined", - "posthog_user"."uuid", - "posthog_user"."current_organization_id", - "posthog_user"."current_team_id", - "posthog_user"."email", - "posthog_user"."pending_email", - "posthog_user"."temporary_token", - "posthog_user"."distinct_id", - "posthog_user"."is_email_verified", - "posthog_user"."has_seen_product_intro_for", - "posthog_user"."email_opt_in", - "posthog_user"."partial_notification_settings", - "posthog_user"."anonymize_data", - "posthog_user"."toolbar_mode", - "posthog_user"."events_column_config" - FROM "posthog_user" - WHERE "posthog_user"."id" = 2 - LIMIT 21 /**/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.248 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -6287,7 +6247,7 @@ LIMIT 21 /**/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.250 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.249 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -6333,7 +6293,36 @@ LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.251 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25 + ' + SELECT "posthog_user"."id", + "posthog_user"."password", + "posthog_user"."last_login", + "posthog_user"."first_name", + "posthog_user"."last_name", + "posthog_user"."is_staff", + "posthog_user"."is_active", + "posthog_user"."date_joined", + "posthog_user"."uuid", + "posthog_user"."current_organization_id", + "posthog_user"."current_team_id", + "posthog_user"."email", + "posthog_user"."pending_email", + "posthog_user"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."email_opt_in", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."events_column_config" + FROM "posthog_user" + WHERE "posthog_user"."id" = 2 + LIMIT 21 /**/ + ' +--- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.250 ' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -6363,7 +6352,7 @@ WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.252 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.251 ' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -6387,7 +6376,7 @@ LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.253 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.252 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -6501,7 +6490,7 @@ LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.254 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.253 ' SELECT "posthog_taggeditem"."id", "posthog_taggeditem"."tag_id", @@ -6523,7 +6512,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.255 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.254 ' SELECT "posthog_sharingconfiguration"."id", "posthog_sharingconfiguration"."team_id", @@ -6541,7 +6530,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.256 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.255 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6704,7 +6693,7 @@ ORDER BY "posthog_dashboarditem"."order" ASC /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.257 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.256 ' SELECT "posthog_insightcachingstate"."id", "posthog_insightcachingstate"."team_id", @@ -6725,7 +6714,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.258 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.257 ' SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id", "posthog_dashboard"."id", @@ -6826,7 +6815,7 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.259 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.258 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6851,6 +6840,32 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.259 + ' + SELECT "posthog_dashboard"."id", + "posthog_dashboard"."name", + "posthog_dashboard"."description", + "posthog_dashboard"."team_id", + "posthog_dashboard"."pinned", + "posthog_dashboard"."created_at", + "posthog_dashboard"."created_by_id", + "posthog_dashboard"."deleted", + "posthog_dashboard"."last_accessed_at", + "posthog_dashboard"."filters", + "posthog_dashboard"."creation_mode", + "posthog_dashboard"."restriction_level", + "posthog_dashboard"."deprecated_tags", + "posthog_dashboard"."tags", + "posthog_dashboard"."share_token", + "posthog_dashboard"."is_shared" + FROM "posthog_dashboard" + WHERE "posthog_dashboard"."id" IN (1, + 2, + 3, + 4, + 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.26 ' SELECT "posthog_team"."id", @@ -6898,32 +6913,6 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.260 - ' - SELECT "posthog_dashboard"."id", - "posthog_dashboard"."name", - "posthog_dashboard"."description", - "posthog_dashboard"."team_id", - "posthog_dashboard"."pinned", - "posthog_dashboard"."created_at", - "posthog_dashboard"."created_by_id", - "posthog_dashboard"."deleted", - "posthog_dashboard"."last_accessed_at", - "posthog_dashboard"."filters", - "posthog_dashboard"."creation_mode", - "posthog_dashboard"."restriction_level", - "posthog_dashboard"."deprecated_tags", - "posthog_dashboard"."tags", - "posthog_dashboard"."share_token", - "posthog_dashboard"."is_shared" - FROM "posthog_dashboard" - WHERE "posthog_dashboard"."id" IN (1, - 2, - 3, - 4, - 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.261 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -7084,7 +7073,7 @@ ORDER BY "posthog_dashboarditem"."order" ASC /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.262 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.261 ' SELECT "posthog_insightcachingstate"."id", "posthog_insightcachingstate"."team_id", @@ -7105,7 +7094,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.263 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.262 ' SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id", "posthog_dashboard"."id", @@ -7206,7 +7195,7 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.264 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.263 ' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -7231,7 +7220,7 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.265 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.264 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7257,7 +7246,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.266 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.265 ' SELECT "posthog_taggeditem"."id", "posthog_taggeditem"."tag_id", @@ -7279,7 +7268,7 @@ 5 /* ... */) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.267 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.266 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7290,7 +7279,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.268 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.267 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7301,7 +7290,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.269 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.268 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7312,6 +7301,17 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.269 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.27 ' SELECT "posthog_organizationmembership"."id", @@ -7343,17 +7343,6 @@ ' --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.270 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.271 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7364,7 +7353,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.272 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.271 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7375,7 +7364,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.273 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.272 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7386,7 +7375,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.274 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.273 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7397,7 +7386,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.275 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.274 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7408,7 +7397,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.276 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.275 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7419,7 +7408,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.277 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.276 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7430,7 +7419,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.278 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.277 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7441,7 +7430,7 @@ LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.279 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.278 ' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7468,6 +7457,17 @@ 5 /* ... */)) /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.279 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.28 ' SELECT "posthog_dashboard"."id", @@ -7498,7 +7498,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7509,7 +7509,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7520,7 +7520,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7531,7 +7531,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7542,7 +7542,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7553,7 +7553,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7564,7 +7564,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7575,7 +7575,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7586,7 +7586,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7597,7 +7597,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7632,7 +7632,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7643,7 +7643,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7654,7 +7654,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7665,7 +7665,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7676,7 +7676,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7687,7 +7687,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7698,7 +7698,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7709,7 +7709,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7720,7 +7720,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7731,7 +7731,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7799,7 +7799,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7810,7 +7810,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7821,7 +7821,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7832,7 +7832,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7843,7 +7843,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7854,7 +7854,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7865,7 +7865,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7876,7 +7876,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7887,7 +7887,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7898,7 +7898,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7944,7 +7944,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7955,7 +7955,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7966,7 +7966,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7977,7 +7977,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' @@ -7988,7 +7988,7 @@ "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC LIMIT 1 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' From 5d2ea5834b5ac79567cfc6fcb4d2864d67c3d826 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:43:48 +0000 Subject: [PATCH 14/39] Update query snapshots --- .../api/test/__snapshots__/test_decide.ambr | 37 ++++++++----------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index dc9b11e82ffe5..0e86aa118820f 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -127,6 +127,17 @@ ' --- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.3 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT (1) AS "a" FROM "posthog_grouptypemapping" @@ -134,7 +145,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -145,7 +156,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -156,7 +167,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -167,7 +178,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -196,7 +207,7 @@ LIMIT 21 ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 ' SELECT "posthog_featureflag"."id", "posthog_featureflag"."key", @@ -219,22 +230,6 @@ AND "posthog_featureflag"."team_id" = 2) ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 - ' - SELECT "posthog_pluginconfig"."id", - "posthog_pluginconfig"."web_token", - "posthog_pluginsourcefile"."updated_at", - "posthog_plugin"."updated_at", - "posthog_pluginconfig"."updated_at" - FROM "posthog_pluginconfig" - INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") - INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") - WHERE ("posthog_pluginconfig"."enabled" - AND "posthog_pluginsourcefile"."filename" = 'site.ts' - AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' - AND "posthog_pluginconfig"."team_id" = 2) - ' ---- # name: TestDecide.test_flag_with_behavioural_cohorts ' SELECT "posthog_user"."id", From 379ecda57e6b9dbada7f74ca6a2976f7011042e7 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 01:04:52 +0000 Subject: [PATCH 15/39] Update query snapshots --- .../api/test/__snapshots__/test_decide.ambr | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index 0e86aa118820f..dc9b11e82ffe5 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -127,17 +127,6 @@ ' --- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.3 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT (1) AS "a" FROM "posthog_grouptypemapping" @@ -145,7 +134,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -156,7 +145,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -167,7 +156,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -178,7 +167,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -207,7 +196,7 @@ LIMIT 21 ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 ' SELECT "posthog_featureflag"."id", "posthog_featureflag"."key", @@ -230,6 +219,22 @@ AND "posthog_featureflag"."team_id" = 2) ' --- +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 + ' + SELECT "posthog_pluginconfig"."id", + "posthog_pluginconfig"."web_token", + "posthog_pluginsourcefile"."updated_at", + "posthog_plugin"."updated_at", + "posthog_pluginconfig"."updated_at" + FROM "posthog_pluginconfig" + INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") + INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") + WHERE ("posthog_pluginconfig"."enabled" + AND "posthog_pluginsourcefile"."filename" = 'site.ts' + AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' + AND "posthog_pluginconfig"."team_id" = 2) + ' +--- # name: TestDecide.test_flag_with_behavioural_cohorts ' SELECT "posthog_user"."id", From 10e0c0202baab1f0f819064d311d022ef2eb831f Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Fri, 20 Oct 2023 01:04:25 +0200 Subject: [PATCH 16/39] Fix --- posthog/api/decide.py | 6 +++++- posthog/api/test/__snapshots__/test_decide.ambr | 16 ---------------- posthog/api/test/test_decide.py | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/posthog/api/decide.py b/posthog/api/decide.py index 8e01679ed5977..4d94385c1fe74 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -220,11 +220,15 @@ def get_decide(request: HttpRequest): on_permitted_recording_domain(team, request) or not team.recording_domains ): capture_console_logs = True if team.capture_console_log_opt_in else False + sample_rate = team.session_recording_sample_rate or None + if sample_rate == "1.00": + sample_rate = None + response["sessionRecording"] = { "endpoint": "/s/", "consoleLogRecordingEnabled": capture_console_logs, "recorderVersion": "v2", - "sampleRate": team.session_recording_sample_rate or None, + "sampleRate": sample_rate, } response["surveys"] = True if team.surveys_opt_in else False diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index dc9b11e82ffe5..611f577b258f7 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -80,22 +80,6 @@ LIMIT 21 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.10 - ' - SELECT "posthog_pluginconfig"."id", - "posthog_pluginconfig"."web_token", - "posthog_pluginsourcefile"."updated_at", - "posthog_plugin"."updated_at", - "posthog_pluginconfig"."updated_at" - FROM "posthog_pluginconfig" - INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") - INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") - WHERE ("posthog_pluginconfig"."enabled" - AND "posthog_pluginsourcefile"."filename" = 'site.ts' - AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' - AND "posthog_pluginconfig"."team_id" = 2) - ' ---- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.2 ' SELECT "posthog_organizationmembership"."id", diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 38c0cce8a87cf..e515902fa79e7 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -183,6 +183,23 @@ def test_session_recording_sample_rate(self, *args): response = self._post_decide().json() self.assertEqual(response["sessionRecording"]["sampleRate"], "0.80") + def test_session_recording_sample_rate_of_1_is_treated_as_no_sampling(self, *args): + # :TRICKY: Test for regression around caching + + self._update_team( + { + "session_recording_opt_in": True, + } + ) + + response = self._post_decide().json() + assert response["sessionRecording"]["sampleRate"] is None + + self._update_team({"session_recording_sample_rate": 1.0}) + + response = self._post_decide().json() + self.assertEqual(response["sessionRecording"]["sampleRate"], None) + def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching response = self._post_decide().json() From 89725ca3bada5d3f1186479c508ecdf0d27676b0 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Fri, 20 Oct 2023 01:05:13 +0200 Subject: [PATCH 17/39] fix --- .../settings/SessionRecordingSettings.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 9a07c27075057..59f13531e77e8 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -119,16 +119,20 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe value: '1.00', }, { - label: '75%', - value: '0.75', + label: '95%', + value: '0.95', }, { - label: '50%', - value: '0.50', + label: '90%', + value: '0.90', + }, + { + label: '80%', + value: '0.80', }, { - label: '25%', - value: '0.25', + label: '50%', + value: '0.50', }, ]} value={ From 0f30d390dd3dbe2e7572b2a8ce870b751775d7b9 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Fri, 20 Oct 2023 01:11:57 +0200 Subject: [PATCH 18/39] fix --- .../settings/SessionRecordingSettings.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 59f13531e77e8..0ec4057c4c934 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -136,15 +136,16 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe }, ]} value={ - (currentTeam?.session_recording_sample_rate === undefined - ? '1.00' - : currentTeam?.session_recording_sample_rate) as SampleRate + (typeof currentTeam?.session_recording_sample_rate === 'string' + ? currentTeam?.session_recording_sample_rate + : '1.00') as SampleRate } />

Use this setting to restrict the percentage of sessions that will be recorded. This is useful if - you want to reduce the amount of data you collect. + you want to reduce the amount of data you collect. 100% means all sessions will be collected. + 50% means roughly half of sessions will be collected.

From 3845825f300b7bf73887c0b63374a89b6be38d3e Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Fri, 20 Oct 2023 16:42:04 +0200 Subject: [PATCH 19/39] add minimum duration setting --- frontend/src/lib/api.mock.ts | 1 + .../settings/SessionRecordingSettings.tsx | 20 ++++++++++- frontend/src/types.ts | 1 + latest_migrations.manifest | 2 +- package.json | 2 +- pnpm-lock.yaml | 32 +++++++++-------- posthog/admin.py | 4 ++- posthog/api/decide.py | 3 ++ posthog/api/team.py | 2 ++ posthog/api/test/test_decide.py | 34 +++++++++++++++++++ posthog/api/test/test_team.py | 20 +++++++++++ ...ate.py => 0356_add_replay_cost_control.py} | 14 +++++++- posthog/models/team/team.py | 3 ++ 13 files changed, 118 insertions(+), 20 deletions(-) rename posthog/migrations/{0356_add_replay_sample_rate.py => 0356_add_replay_cost_control.py} (61%) diff --git a/frontend/src/lib/api.mock.ts b/frontend/src/lib/api.mock.ts index c51de9249ab7d..73e9764cd8654 100644 --- a/frontend/src/lib/api.mock.ts +++ b/frontend/src/lib/api.mock.ts @@ -68,6 +68,7 @@ export const MOCK_DEFAULT_TEAM: TeamType = { autocapture_opt_out: true, session_recording_opt_in: true, session_recording_sample_rate: '1.0', + session_recording_minimum_duration_milliseconds: null, capture_console_log_opt_in: true, capture_performance_opt_in: true, autocapture_exceptions_opt_in: false, diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 0ec4057c4c934..831e8db551d69 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -1,6 +1,6 @@ import { useActions, useValues } from 'kea' import { teamLogic } from 'scenes/teamLogic' -import { LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' +import { LemonInput, LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' import { urls } from 'scenes/urls' import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList' import { AuthorizedUrlListType } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic' @@ -149,6 +149,24 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe

+ + <> +
+ Minimum session duration + { + updateCurrentTeam({ session_recording_minimum_duration_milliseconds: v || null }) + }} + type={'number'} + allowClear={true} + /> +
+

+ Setting a minimum session duration will ensure that only sessions that last longer than that + value are collected. This helps you avoid collecting sessions that are too short to be useful. +

+ +
) } diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 1336061de58ff..066c15c7b9c08 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -340,6 +340,7 @@ export interface TeamType extends TeamBasicType { capture_console_log_opt_in: boolean capture_performance_opt_in: boolean session_recording_sample_rate: SampleRate + session_recording_minimum_duration_milliseconds: number | null autocapture_exceptions_opt_in: boolean surveys_opt_in?: boolean autocapture_exceptions_errors_to_ignore: string[] diff --git a/latest_migrations.manifest b/latest_migrations.manifest index 982a5a45b898b..814358e2c8565 100644 --- a/latest_migrations.manifest +++ b/latest_migrations.manifest @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name ee: 0015_add_verified_properties otp_static: 0002_throttling otp_totp: 0002_auto_20190420_0723 -posthog: 0356_add_replay_sample_rate +posthog: 0356_add_replay_cost_control sessions: 0001_initial social_django: 0010_uid_db_index two_factor: 0007_auto_20201201_1019 diff --git a/package.json b/package.json index 9e1427c744e65..560cadb515b4d 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "md5": "^2.3.0", "monaco-editor": "^0.39.0", "papaparse": "^5.4.1", - "posthog-js": "1.84.1", + "posthog-js": "file:.yalc/posthog-js", "posthog-js-lite": "2.0.0-alpha5", "prettier": "^2.8.8", "prop-types": "^15.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06757dfe6200b..5f922cf27a7dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -207,8 +207,8 @@ dependencies: specifier: ^5.4.1 version: 5.4.1 posthog-js: - specifier: 1.84.1 - version: 1.84.1 + specifier: file:.yalc/posthog-js + version: file:.yalc/posthog-js posthog-js-lite: specifier: 2.0.0-alpha5 version: 2.0.0-alpha5 @@ -5847,7 +5847,7 @@ packages: resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==} dependencies: '@types/connect': 3.4.37 - '@types/node': 18.11.9 + '@types/node': 18.18.4 dev: true /@types/chart.js@2.9.37: @@ -5875,7 +5875,7 @@ packages: /@types/connect@3.4.37: resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.18.4 dev: true /@types/cookie@0.4.1: @@ -6153,7 +6153,7 @@ packages: /@types/express-serve-static-core@4.17.38: resolution: {integrity: sha512-hXOtc0tuDHZPFwwhuBJXPbjemWtXnJjbvuuyNH2Y5Z6in+iXc63c4eXYDc7GGGqHy+iwYqAJMdaItqdnbcBKmg==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.18.4 '@types/qs': 6.9.9 '@types/range-parser': 1.2.6 '@types/send': 0.17.3 @@ -6493,7 +6493,7 @@ packages: resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==} dependencies: '@types/mime': 1.3.4 - '@types/node': 18.11.9 + '@types/node': 18.18.4 dev: true /@types/serve-static@1.15.2: @@ -6509,7 +6509,7 @@ packages: dependencies: '@types/http-errors': 2.0.3 '@types/mime': 3.0.3 - '@types/node': 18.11.9 + '@types/node': 18.18.4 dev: true /@types/set-cookie-parser@2.4.2: @@ -13225,7 +13225,7 @@ packages: dependencies: universalify: 2.0.0 optionalDependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 /jsprim@2.0.2: resolution: {integrity: sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==} @@ -15144,12 +15144,6 @@ packages: resolution: {integrity: sha512-tlkBdypJuvK/s00n4EiQjwYVfuuZv6vt8BF3g1ooIQa2Gz9Vz80p8q3qsPLZ0V5ErGRy6i3Q4fWC9TDzR7GNRQ==} dev: false - /posthog-js@1.84.1: - resolution: {integrity: sha512-VWf6Hj9qBCyXBahIeUiOF/P8EuMfuD3db7QiS5hlytmJt0n5KwroIkN+oP6GrYBa3fzt9OWNLFVyRZ2wNE/vrg==} - dependencies: - fflate: 0.4.8 - dev: false - /prelude-ls@1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} @@ -19059,3 +19053,11 @@ packages: /zxcvbn@4.4.2: resolution: {integrity: sha512-Bq0B+ixT/DMyG8kgX2xWcI5jUvCwqrMxSFam7m0lAf78nf04hv6lNCsyLYdyYTrCVMqNDY/206K7eExYCeSyUQ==} dev: false + + file:.yalc/posthog-js: + resolution: {directory: .yalc/posthog-js, type: directory} + name: posthog-js + version: 1.83.3 + dependencies: + fflate: 0.4.8 + dev: false diff --git a/posthog/admin.py b/posthog/admin.py index 864490e7302a7..8849fd6f8305b 100644 --- a/posthog/admin.py +++ b/posthog/admin.py @@ -184,7 +184,9 @@ class TeamAdmin(admin.ModelAdmin): "capture_console_log_opt_in", "capture_performance_opt_in", "session_recording_sample_rate", - "updateCurrentTeam({ capture_console_log_opt_in: checked })" "data_attributes", + "session_recording_minimum_duration_milliseconds" + "updateCurrentTeam({ capture_console_log_opt_in: checked })" + "data_attributes", "session_recording_version", "access_control", "inject_web_apps", diff --git a/posthog/api/decide.py b/posthog/api/decide.py index 679bd4de16519..7ef6a834c12b6 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -223,11 +223,14 @@ def get_decide(request: HttpRequest): if sample_rate == "1.00": sample_rate = None + minimum_duration = team.session_recording_minimum_duration_milliseconds or None + response["sessionRecording"] = { "endpoint": "/s/", "consoleLogRecordingEnabled": capture_console_logs, "recorderVersion": "v2", "sampleRate": sample_rate, + "minimumDurationMilliseconds": minimum_duration, } response["surveys"] = True if team.surveys_opt_in else False diff --git a/posthog/api/team.py b/posthog/api/team.py index d2ad3f538233b..e25177e4ff087 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -89,6 +89,7 @@ class Meta: "capture_console_log_opt_in", "session_recording_opt_in", "session_recording_sample_rate", + "session_recording_minimum_duration_milliseconds", "recording_domains", "inject_web_apps", "surveys_opt_in", @@ -130,6 +131,7 @@ class Meta: "capture_performance_opt_in", "session_recording_opt_in", "session_recording_sample_rate", + "session_recording_minimum_duration_milliseconds", "effective_membership_level", "access_control", "week_start_day", diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 31ac92785b366..7f1a72393abf0 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -200,6 +200,40 @@ def test_session_recording_sample_rate_of_1_is_treated_as_no_sampling(self, *arg response = self._post_decide().json() self.assertEqual(response["sessionRecording"]["sampleRate"], None) + def test_session_recording_minimum_duration(self, *args): + # :TRICKY: Test for regression around caching + + self._update_team( + { + "session_recording_opt_in": True, + } + ) + + response = self._post_decide().json() + assert response["sessionRecording"]["minimumDurationMilliseconds"] is None + + self._update_team({"session_recording_minimum_duration_milliseconds": 800}) + + response = self._post_decide().json() + self.assertEqual(response["sessionRecording"]["minimumDurationMilliseconds"], "800") + + def test_session_recording_sample_rate_of_0_is_treated_as_no_sampling(self, *args): + # :TRICKY: Test for regression around caching + + self._update_team( + { + "session_recording_opt_in": True, + } + ) + + response = self._post_decide().json() + assert response["sessionRecording"]["sampleRate"] is None + + self._update_team({"session_recording_minimum_duration_milliseconds": 0}) + + response = self._post_decide().json() + self.assertEqual(response["sessionRecording"]["minimumDurationMilliseconds"], None) + def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching response = self._post_decide().json() diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index f3797c3eb255c..3c856e35550d4 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -506,6 +506,26 @@ def test_invalid_session_recording_sample_rates( "type": "validation_error", } + @parameterized.expand( + [ + ["non numeric string", "Trentham monkey forest", "invalid_input", "A valid number is required."], + ["negative number", "-1", "min_value", "Ensure this value is greater than or equal to 0."], + ["greater than 15000", "15001", "max_value", "Ensure this value is less than or equal to 1."], + ["too many digits", "0.5", "max_decimal_places", "Ensure that there are no decimal places."], + ] + ) + def test_invalid_session_recording_minimum_duration( + self, _name: str, provided_value: str, expected_code: str, expected_error: str + ) -> None: + response = self.client.patch("/api/projects/@current/", {"session_recording_sample_rate": provided_value}) + assert response.status_code == status.HTTP_400_BAD_REQUEST + assert response.json() == { + "attr": "session_recording_sample_rate", + "code": expected_code, + "detail": expected_error, + "type": "validation_error", + } + def create_team(organization: Organization, name: str = "Test team") -> Team: """ diff --git a/posthog/migrations/0356_add_replay_sample_rate.py b/posthog/migrations/0356_add_replay_cost_control.py similarity index 61% rename from posthog/migrations/0356_add_replay_sample_rate.py rename to posthog/migrations/0356_add_replay_cost_control.py index 74b50c9efaa5b..53c539c564dbc 100644 --- a/posthog/migrations/0356_add_replay_sample_rate.py +++ b/posthog/migrations/0356_add_replay_cost_control.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.19 on 2023-10-19 23:08 +# Generated by Django 3.2.19 on 2023-10-20 12:04 from decimal import Decimal import django.core.validators @@ -12,6 +12,18 @@ class Migration(migrations.Migration): ] operations = [ + migrations.AddField( + model_name="team", + name="session_recording_minimum_duration_milliseconds", + field=models.IntegerField( + blank=True, + null=True, + validators=[ + django.core.validators.MinValueValidator(0), + django.core.validators.MaxValueValidator(15000), + ], + ), + ), migrations.AddField( model_name="team", name="session_recording_sample_rate", diff --git a/posthog/models/team/team.py b/posthog/models/team/team.py index a602da318b913..3d46074504ba4 100644 --- a/posthog/models/team/team.py +++ b/posthog/models/team/team.py @@ -157,6 +157,9 @@ class Team(UUIDClassicModel): decimal_places=2, validators=[MinValueValidator(Decimal(0)), MaxValueValidator(Decimal(1))], ) + session_recording_minimum_duration_milliseconds: models.IntegerField = models.IntegerField( + null=True, blank=True, validators=[MinValueValidator(0), MaxValueValidator(15000)] + ) capture_console_log_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) capture_performance_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) surveys_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) From 87ce2e2d620789f92717f3311170da4ddc4ace17 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Fri, 20 Oct 2023 22:09:42 +0200 Subject: [PATCH 20/39] dropdown instead of text box --- .../settings/SessionRecordingSettings.tsx | 42 ++++++++++++++----- frontend/src/scenes/teamLogic.tsx | 7 +++- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 831e8db551d69..631c37809a45f 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -1,6 +1,6 @@ import { useActions, useValues } from 'kea' import { teamLogic } from 'scenes/teamLogic' -import { LemonInput, LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' +import { LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' import { urls } from 'scenes/urls' import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList' import { AuthorizedUrlListType } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic' @@ -147,18 +147,40 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe you want to reduce the amount of data you collect. 100% means all sessions will be collected. 50% means roughly half of sessions will be collected.

- - - - <>
- Minimum session duration - Minimum session duration (seconds) + { - updateCurrentTeam({ session_recording_minimum_duration_milliseconds: v || null }) + updateCurrentTeam({ session_recording_minimum_duration_milliseconds: v }) }} - type={'number'} - allowClear={true} + options={[ + { + label: 'no minimum', + value: null, + }, + { + label: '1', + value: 1000, + }, + { + label: '2', + value: 2000, + }, + { + label: '5', + value: 5000, + }, + { + label: '10', + value: 10000, + }, + { + label: '15', + value: 15000, + }, + ]} + value={currentTeam?.session_recording_minimum_duration_milliseconds} />

diff --git a/frontend/src/scenes/teamLogic.tsx b/frontend/src/scenes/teamLogic.tsx index a30bab40298f0..25775b0825edb 100644 --- a/frontend/src/scenes/teamLogic.tsx +++ b/frontend/src/scenes/teamLogic.tsx @@ -69,11 +69,16 @@ export const teamLogic = kea([ return null } }, - updateCurrentTeam: async (payload: Partial) => { + updateCurrentTeam: async (payload: Partial, breakpoint) => { if (!values.currentTeam) { throw new Error('Current team has not been loaded yet, so it cannot be updated!') } + + await breakpoint(50) + const patchedTeam = (await api.update(`api/projects/${values.currentTeam.id}`, payload)) as TeamType + breakpoint() + actions.loadUser() /* Notify user the update was successful */ From ca76d1c42e766a8607c617be5e12f4f11ee974c4 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 09:33:55 +0200 Subject: [PATCH 21/39] start adding linked flag --- frontend/src/lib/components/FlagSelector.tsx | 51 ++++++++++++++++++ .../EarlyAccessFeature.tsx | 53 ++----------------- .../settings/SessionRecordingSettings.tsx | 23 +++++++- frontend/src/scenes/surveys/Survey.tsx | 2 +- frontend/src/scenes/surveys/SurveyEdit.tsx | 2 +- frontend/src/types.ts | 1 + posthog/admin.py | 6 +-- posthog/api/team.py | 8 +++ posthog/api/test/test_decide.py | 34 ++++++++++++ posthog/api/test/test_team.py | 48 +++++++++++++++-- .../0356_add_replay_cost_control.py | 7 ++- posthog/models/team/team.py | 1 + 12 files changed, 174 insertions(+), 62 deletions(-) create mode 100644 frontend/src/lib/components/FlagSelector.tsx diff --git a/frontend/src/lib/components/FlagSelector.tsx b/frontend/src/lib/components/FlagSelector.tsx new file mode 100644 index 0000000000000..74e66ed82049c --- /dev/null +++ b/frontend/src/lib/components/FlagSelector.tsx @@ -0,0 +1,51 @@ +import { useState } from 'react' +import { useValues } from 'kea' +import { featureFlagLogic } from 'scenes/feature-flags/featureFlagLogic' +import { TaxonomicFilterGroupType, TaxonomicFilterLogicProps } from 'lib/components/TaxonomicFilter/types' +import { Popover } from 'lib/lemon-ui/Popover' +import { TaxonomicFilter } from 'lib/components/TaxonomicFilter/TaxonomicFilter' +import { LemonButton } from 'lib/lemon-ui/LemonButton' + +interface FlagSelectorProps { + value: number | undefined + onChange: (id: number, key: string) => void + readOnly?: boolean +} + +export function FlagSelector({ value, onChange, readOnly }: FlagSelectorProps): JSX.Element { + const [visible, setVisible] = useState(false) + + const { featureFlag } = useValues(featureFlagLogic({ id: value || 'link' })) + + const taxonomicFilterLogicProps: TaxonomicFilterLogicProps = { + groupType: TaxonomicFilterGroupType.FeatureFlags, + value: value, + onChange: (_, __, item) => { + 'id' in item && item.id && onChange(item.id, item.key) + setVisible(false) + }, + taxonomicGroupTypes: [TaxonomicFilterGroupType.FeatureFlags], + optionsFromProp: undefined, + popoverEnabled: true, + selectFirstItem: true, + taxonomicFilterLogicKey: 'flag-selectorz', + } + + return ( + } + visible={visible} + placement="right-start" + fallbackPlacements={['bottom']} + onClickOutside={() => setVisible(false)} + > + {readOnly ? ( +

{featureFlag.key}
+ ) : ( + setVisible(!visible)}> + {featureFlag.key ? featureFlag.key : 'Select flag'} + + )} + + ) +} diff --git a/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx b/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx index a894b964432cf..7fd04b72e348a 100644 --- a/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx +++ b/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx @@ -1,5 +1,5 @@ import { LemonButton, LemonDivider, LemonInput, LemonSkeleton, LemonTag, LemonTextArea } from '@posthog/lemon-ui' -import { useActions, useValues, BindLogic } from 'kea' +import { BindLogic, useActions, useValues } from 'kea' import { PageHeader } from 'lib/components/PageHeader' import { Field, PureField } from 'lib/forms/Field' import { SceneExport } from 'scenes/sceneTypes' @@ -16,13 +16,9 @@ import { import { urls } from 'scenes/urls' import { IconClose, IconFlag, IconHelpOutline } from 'lib/lemon-ui/icons' import { router } from 'kea-router' -import { useState } from 'react' -import { Popover } from 'lib/lemon-ui/Popover' -import { TaxonomicFilter } from 'lib/components/TaxonomicFilter/TaxonomicFilter' -import { TaxonomicFilterLogicProps } from 'lib/components/TaxonomicFilter/types' import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' import { featureFlagLogic } from 'scenes/feature-flags/featureFlagLogic' -import { PersonsLogicProps, personsLogic } from 'scenes/persons/personsLogic' +import { personsLogic, PersonsLogicProps } from 'scenes/persons/personsLogic' import clsx from 'clsx' import { InstructionsModal } from './InstructionsModal' import { PersonsTable } from 'scenes/persons/PersonsTable' @@ -31,6 +27,7 @@ import { PersonsSearch } from 'scenes/persons/PersonsSearch' import { LemonDialog } from 'lib/lemon-ui/LemonDialog' import { LemonTabs } from 'lib/lemon-ui/LemonTabs' import { NotFound } from 'lib/components/NotFound' +import { FlagSelector } from 'lib/components/FlagSelector' export const scene: SceneExport = { component: EarlyAccessFeature, @@ -295,50 +292,6 @@ export function EarlyAccessFeature({ id }: { id?: string } = {}): JSX.Element { ) } -interface FlagSelectorProps { - value: number | undefined - onChange: (value: any) => void - readOnly?: boolean -} - -export function FlagSelector({ value, onChange, readOnly }: FlagSelectorProps): JSX.Element { - const [visible, setVisible] = useState(false) - - const { featureFlag } = useValues(featureFlagLogic({ id: value || 'link' })) - - const taxonomicFilterLogicProps: TaxonomicFilterLogicProps = { - groupType: TaxonomicFilterGroupType.FeatureFlags, - value, - onChange: (_, __, item) => { - 'id' in item && item.id && onChange(item.id) - setVisible(false) - }, - taxonomicGroupTypes: [TaxonomicFilterGroupType.FeatureFlags], - optionsFromProp: undefined, - popoverEnabled: true, - selectFirstItem: true, - taxonomicFilterLogicKey: 'flag-selectorz', - } - - return ( - } - visible={visible} - placement="right-start" - fallbackPlacements={['bottom']} - onClickOutside={() => setVisible(false)} - > - {readOnly ? ( -
{featureFlag.key}
- ) : ( - setVisible(!visible)}> - {featureFlag.key ? featureFlag.key : 'Select flag'} - - )} -
- ) -} - interface PersonListProps { earlyAccessFeature: EarlyAccessFeatureType } diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 631c37809a45f..79f043354a71a 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -1,6 +1,6 @@ import { useActions, useValues } from 'kea' import { teamLogic } from 'scenes/teamLogic' -import { LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' +import { LemonButton, LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' import { urls } from 'scenes/urls' import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList' import { AuthorizedUrlListType } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic' @@ -9,6 +9,8 @@ import { LemonLabel } from 'lib/lemon-ui/LemonLabel/LemonLabel' import { FlaggedFeature } from 'lib/components/FlaggedFeature' import { FEATURE_FLAGS } from 'lib/constants' import { SampleRate } from '~/types' +import { IconCancel } from 'lib/lemon-ui/icons' +import { FlagSelector } from 'lib/components/FlagSelector' export type SessionRecordingSettingsProps = { inModal?: boolean @@ -187,6 +189,25 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe Setting a minimum session duration will ensure that only sessions that last longer than that value are collected. This helps you avoid collecting sessions that are too short to be useful.

+
+ Enable recordings using feature flag + { + updateCurrentTeam({ session_recording_linked_flag: { id, key } }) + }} + /> + {currentTeam?.session_recording_linked_flag && ( + } + size="small" + status="stealth" + onClick={() => updateCurrentTeam({ session_recording_linked_flag: null })} + aria-label="close" + /> + )} +
diff --git a/frontend/src/scenes/surveys/Survey.tsx b/frontend/src/scenes/surveys/Survey.tsx index c3c604a825e4c..a6a74a9ff1877 100644 --- a/frontend/src/scenes/surveys/Survey.tsx +++ b/frontend/src/scenes/surveys/Survey.tsx @@ -8,13 +8,13 @@ import { LemonButton, LemonDivider, Link } from '@posthog/lemon-ui' import { router } from 'kea-router' import { urls } from 'scenes/urls' import { Survey, SurveyUrlMatchType } from '~/types' -import { FlagSelector } from 'scenes/early-access-features/EarlyAccessFeature' import { SurveyView } from './SurveyView' import { featureFlagLogic } from 'scenes/feature-flags/featureFlagLogic' import { NewSurvey, SurveyUrlMatchTypeLabels } from './constants' import { FeatureFlagReleaseConditions } from 'scenes/feature-flags/FeatureFlagReleaseConditions' import SurveyEdit from './SurveyEdit' import { NotFound } from 'lib/components/NotFound' +import { FlagSelector } from 'lib/components/FlagSelector' export const scene: SceneExport = { component: SurveyComponent, diff --git a/frontend/src/scenes/surveys/SurveyEdit.tsx b/frontend/src/scenes/surveys/SurveyEdit.tsx index 9b8b0b41f8a08..2fccef0e4da7b 100644 --- a/frontend/src/scenes/surveys/SurveyEdit.tsx +++ b/frontend/src/scenes/surveys/SurveyEdit.tsx @@ -22,7 +22,6 @@ import { RatingSurveyQuestion, SurveyUrlMatchType, } from '~/types' -import { FlagSelector } from 'scenes/early-access-features/EarlyAccessFeature' import { IconCancel, IconDelete, IconPlus, IconPlusMini } from 'lib/lemon-ui/icons' import { BaseAppearance, @@ -45,6 +44,7 @@ import { CodeEditor } from 'lib/components/CodeEditors' import { FEATURE_FLAGS } from 'lib/constants' import { featureFlagLogic as enabledFeaturesLogic } from 'lib/logic/featureFlagLogic' import { SurveyFormAppearance } from './SurveyFormAppearance' +import { FlagSelector } from 'lib/components/FlagSelector' function PresentationTypeCard({ title, diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 066c15c7b9c08..d7005ba69d72b 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -341,6 +341,7 @@ export interface TeamType extends TeamBasicType { capture_performance_opt_in: boolean session_recording_sample_rate: SampleRate session_recording_minimum_duration_milliseconds: number | null + session_recording_linked_flag: Pick | null autocapture_exceptions_opt_in: boolean surveys_opt_in?: boolean autocapture_exceptions_errors_to_ignore: string[] diff --git a/posthog/admin.py b/posthog/admin.py index 8849fd6f8305b..b35bae3944689 100644 --- a/posthog/admin.py +++ b/posthog/admin.py @@ -184,9 +184,9 @@ class TeamAdmin(admin.ModelAdmin): "capture_console_log_opt_in", "capture_performance_opt_in", "session_recording_sample_rate", - "session_recording_minimum_duration_milliseconds" - "updateCurrentTeam({ capture_console_log_opt_in: checked })" - "data_attributes", + "session_recording_minimum_duration_milliseconds", + "session_recording_linked_flag", + "updateCurrentTeam({ capture_console_log_opt_in: checked })" "data_attributes", "session_recording_version", "access_control", "inject_web_apps", diff --git a/posthog/api/team.py b/posthog/api/team.py index e25177e4ff087..60740683c6783 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -90,6 +90,7 @@ class Meta: "session_recording_opt_in", "session_recording_sample_rate", "session_recording_minimum_duration_milliseconds", + "session_recording_linked_flag", "recording_domains", "inject_web_apps", "surveys_opt_in", @@ -132,6 +133,7 @@ class Meta: "session_recording_opt_in", "session_recording_sample_rate", "session_recording_minimum_duration_milliseconds", + "session_recording_linked_flag", "effective_membership_level", "access_control", "week_start_day", @@ -169,6 +171,12 @@ def get_has_group_types(self, team: Team) -> bool: def get_groups_on_events_querying_enabled(self, team: Team) -> bool: return groups_on_events_querying_enabled() + def validate_session_recording_linked_flag(self, value): + if not isinstance(value, Dict): + raise exceptions.ValidationError("Must provide a dictionary.") + if value.keys() != {"id", "key"}: + raise exceptions.ValidationError("Must provide a dictionary with a only: id and key.") + def validate(self, attrs: Any) -> Any: if "primary_dashboard" in attrs and attrs["primary_dashboard"].team != self.instance: raise exceptions.PermissionDenied("Dashboard does not belong to this team.") diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 7f1a72393abf0..9e0478a68a0ae 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -234,6 +234,40 @@ def test_session_recording_sample_rate_of_0_is_treated_as_no_sampling(self, *arg response = self._post_decide().json() self.assertEqual(response["sessionRecording"]["minimumDurationMilliseconds"], None) + def test_session_recording_linked_flag(self, *args): + # :TRICKY: Test for regression around caching + + self._update_team( + { + "session_recording_opt_in": True, + } + ) + + response = self._post_decide().json() + assert response["sessionRecording"]["linkedFlag"] is None + + self._update_team({"session_recording_linked_flag": {"id": 12, "key": "my-flag"}}) + + response = self._post_decide().json() + self.assertEqual(response["sessionRecording"]["linkedFlag"], {"id": 12, "key": "my-flag"}) + + def test_session_recording_empty_linked_flag(self, *args): + # :TRICKY: Test for regression around caching + + self._update_team( + { + "session_recording_opt_in": True, + } + ) + + response = self._post_decide().json() + assert response["sessionRecording"]["linkedFlag"] is None + + self._update_team({"session_recording_linked_flag": {}}) + + response = self._post_decide().json() + self.assertEqual(response["sessionRecording"]["linkedFlag"], None) + def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching response = self._post_decide().json() diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index 3c856e35550d4..8b2e99003f755 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -508,19 +508,57 @@ def test_invalid_session_recording_sample_rates( @parameterized.expand( [ - ["non numeric string", "Trentham monkey forest", "invalid_input", "A valid number is required."], + ["non numeric string", "Trentham monkey forest", "invalid_input", "A valid integer is required."], ["negative number", "-1", "min_value", "Ensure this value is greater than or equal to 0."], - ["greater than 15000", "15001", "max_value", "Ensure this value is less than or equal to 1."], - ["too many digits", "0.5", "max_decimal_places", "Ensure that there are no decimal places."], + ["greater than 15000", "15001", "max_value", "Ensure this value is less than or equal to 15000."], + ["too many digits", "0.5", "invalid_input", "A valid integer is required."], ] ) def test_invalid_session_recording_minimum_duration( self, _name: str, provided_value: str, expected_code: str, expected_error: str ) -> None: - response = self.client.patch("/api/projects/@current/", {"session_recording_sample_rate": provided_value}) + response = self.client.patch( + "/api/projects/@current/", {"session_recording_minimum_duration_milliseconds": provided_value} + ) assert response.status_code == status.HTTP_400_BAD_REQUEST assert response.json() == { - "attr": "session_recording_sample_rate", + "attr": "session_recording_minimum_duration_milliseconds", + "code": expected_code, + "detail": expected_error, + "type": "validation_error", + } + + @parameterized.expand( + [ + ["string", "Marple bridge", "invalid_input", "Must provide a dictionary."], + ["numeric", "-1", "invalid_input", "Must provide a dictionary."], + [ + "unexpected json - no id", + {"key": "something"}, + "invalid_input", + "Must provide a dictionary with a only: id and key.", + ], + [ + "unexpected json - no key", + {"id": 1}, + "invalid_input", + "Must provide a dictionary with a only: id and key.", + ], + [ + "unexpected json - neither", + {"wat": "wat"}, + "invalid_input", + "Must provide a dictionary with a only: id and key.", + ], + ] + ) + def test_invalid_session_recording_linked_flag( + self, _name: str, provided_value: str, expected_code: str, expected_error: str + ) -> None: + response = self.client.patch("/api/projects/@current/", {"session_recording_linked_flag": provided_value}) + assert response.status_code == status.HTTP_400_BAD_REQUEST + assert response.json() == { + "attr": "session_recording_linked_flag", "code": expected_code, "detail": expected_error, "type": "validation_error", diff --git a/posthog/migrations/0356_add_replay_cost_control.py b/posthog/migrations/0356_add_replay_cost_control.py index 53c539c564dbc..96c5cb166f4f8 100644 --- a/posthog/migrations/0356_add_replay_cost_control.py +++ b/posthog/migrations/0356_add_replay_cost_control.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.19 on 2023-10-20 12:04 +# Generated by Django 3.2.19 on 2023-10-21 07:03 from decimal import Decimal import django.core.validators @@ -12,6 +12,11 @@ class Migration(migrations.Migration): ] operations = [ + migrations.AddField( + model_name="team", + name="session_recording_linked_flag", + field=models.JSONField(blank=True, null=True), + ), migrations.AddField( model_name="team", name="session_recording_minimum_duration_milliseconds", diff --git a/posthog/models/team/team.py b/posthog/models/team/team.py index 3d46074504ba4..4cd9ae773fdeb 100644 --- a/posthog/models/team/team.py +++ b/posthog/models/team/team.py @@ -160,6 +160,7 @@ class Team(UUIDClassicModel): session_recording_minimum_duration_milliseconds: models.IntegerField = models.IntegerField( null=True, blank=True, validators=[MinValueValidator(0), MaxValueValidator(15000)] ) + session_recording_linked_flag: models.JSONField = models.JSONField(null=True, blank=True) capture_console_log_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) capture_performance_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) surveys_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) From c0833ee8dabf389e149a9cc72311e0fa92bd3843 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 12:54:21 +0200 Subject: [PATCH 22/39] fix --- frontend/src/lib/api.mock.ts | 1 + frontend/src/lib/components/FlagSelector.tsx | 2 +- .../settings/SessionRecordingSettings.tsx | 16 ++++++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/src/lib/api.mock.ts b/frontend/src/lib/api.mock.ts index 73e9764cd8654..45666cb019353 100644 --- a/frontend/src/lib/api.mock.ts +++ b/frontend/src/lib/api.mock.ts @@ -69,6 +69,7 @@ export const MOCK_DEFAULT_TEAM: TeamType = { session_recording_opt_in: true, session_recording_sample_rate: '1.0', session_recording_minimum_duration_milliseconds: null, + session_recording_linked_flag: null, capture_console_log_opt_in: true, capture_performance_opt_in: true, autocapture_exceptions_opt_in: false, diff --git a/frontend/src/lib/components/FlagSelector.tsx b/frontend/src/lib/components/FlagSelector.tsx index 74e66ed82049c..2c14b90d98b03 100644 --- a/frontend/src/lib/components/FlagSelector.tsx +++ b/frontend/src/lib/components/FlagSelector.tsx @@ -36,7 +36,7 @@ export function FlagSelector({ value, onChange, readOnly }: FlagSelectorProps): overlay={} visible={visible} placement="right-start" - fallbackPlacements={['bottom']} + fallbackPlacements={['left-end', 'bottom']} onClickOutside={() => setVisible(false)} > {readOnly ? ( diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 79f043354a71a..da5d6ddaeffbb 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -191,12 +191,6 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe

Enable recordings using feature flag - { - updateCurrentTeam({ session_recording_linked_flag: { id, key } }) - }} - /> {currentTeam?.session_recording_linked_flag && ( )} + { + updateCurrentTeam({ session_recording_linked_flag: { id, key } }) + }} + />
+

+ Linking a flag means that recordings will only be collected for users who have the flag enabled. + Only supports release toggles (boolean flags). +

From a083c3b8bb134193873aa89683d5da35502cff34 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 13:00:20 +0200 Subject: [PATCH 23/39] fix --- posthog/api/decide.py | 1 + posthog/api/team.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/posthog/api/decide.py b/posthog/api/decide.py index 7ef6a834c12b6..febb1a5961dcf 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -231,6 +231,7 @@ def get_decide(request: HttpRequest): "recorderVersion": "v2", "sampleRate": sample_rate, "minimumDurationMilliseconds": minimum_duration, + "linkedFlag": team.session_recording_linked_flag or None, } response["surveys"] = True if team.surveys_opt_in else False diff --git a/posthog/api/team.py b/posthog/api/team.py index 60740683c6783..e47bf5a6852e8 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -171,12 +171,14 @@ def get_has_group_types(self, team: Team) -> bool: def get_groups_on_events_querying_enabled(self, team: Team) -> bool: return groups_on_events_querying_enabled() - def validate_session_recording_linked_flag(self, value): + def validate_session_recording_linked_flag(self, value) -> Dict: if not isinstance(value, Dict): raise exceptions.ValidationError("Must provide a dictionary.") if value.keys() != {"id", "key"}: raise exceptions.ValidationError("Must provide a dictionary with a only: id and key.") + return value + def validate(self, attrs: Any) -> Any: if "primary_dashboard" in attrs and attrs["primary_dashboard"].team != self.instance: raise exceptions.PermissionDenied("Dashboard does not belong to this team.") From a561d6beed37953a6364a82399e83c3b2a4ecfa0 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 21 Oct 2023 11:20:12 +0000 Subject: [PATCH 24/39] Update query snapshots --- .../test/__snapshots__/test_preflight.ambr | 2 + .../api/test/__snapshots__/test_survey.ambr | 2 + .../__snapshots__/test_dashboard.ambr | 146 ++++++++++++++++++ .../__snapshots__/test_notebook.ambr | 14 ++ 4 files changed, 164 insertions(+) diff --git a/posthog/api/test/__snapshots__/test_preflight.ambr b/posthog/api/test/__snapshots__/test_preflight.ambr index faf3d0d1809d3..93baa4d92d31e 100644 --- a/posthog/api/test/__snapshots__/test_preflight.ambr +++ b/posthog/api/test/__snapshots__/test_preflight.ambr @@ -58,6 +58,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_survey.ambr b/posthog/api/test/__snapshots__/test_survey.ambr index 1d86f45b68e7b..7e4be97199109 100644 --- a/posthog/api/test/__snapshots__/test_survey.ambr +++ b/posthog/api/test/__snapshots__/test_survey.ambr @@ -126,6 +126,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index f809d8b6f551f..33832fe5073e2 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -47,6 +47,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -168,6 +170,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -284,6 +288,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -491,6 +497,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -653,6 +661,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -827,6 +837,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -987,6 +999,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1222,6 +1236,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1275,6 +1291,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1426,6 +1444,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1532,6 +1552,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1585,6 +1607,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1734,6 +1758,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1856,6 +1882,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2112,6 +2140,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2348,6 +2378,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2472,6 +2504,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2588,6 +2622,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2703,6 +2739,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2798,6 +2836,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2944,6 +2984,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3036,6 +3078,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3155,6 +3199,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3274,6 +3320,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3404,6 +3452,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3720,6 +3770,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3874,6 +3926,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4004,6 +4058,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4085,6 +4141,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4242,6 +4300,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4295,6 +4355,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4414,6 +4476,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4560,6 +4624,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4981,6 +5047,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5118,6 +5186,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5199,6 +5269,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5318,6 +5390,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5398,6 +5472,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5451,6 +5527,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5570,6 +5648,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5706,6 +5786,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5864,6 +5946,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6267,6 +6351,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6412,6 +6498,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6589,6 +6677,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6751,6 +6841,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6886,6 +6978,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6971,6 +7065,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7131,6 +7227,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7767,6 +7865,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8024,6 +8124,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8181,6 +8283,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8234,6 +8338,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8353,6 +8459,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8499,6 +8607,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8618,6 +8728,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8749,6 +8861,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8885,6 +8999,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9190,6 +9306,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9340,6 +9458,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9440,6 +9560,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9565,6 +9687,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9687,6 +9811,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9814,6 +9940,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9991,6 +10119,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10144,6 +10274,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10243,6 +10375,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10399,6 +10533,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10573,6 +10709,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10679,6 +10817,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10835,6 +10975,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10970,6 +11112,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -11176,6 +11320,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr index b5b5e3d5f3976..993103ccbf72e 100644 --- a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr +++ b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr @@ -47,6 +47,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -133,6 +135,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -186,6 +190,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -298,6 +304,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -506,6 +514,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -605,6 +615,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -708,6 +720,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From 0b77b0ca562244861ca571a40cd01f87efd8bda8 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 21 Oct 2023 11:25:25 +0000 Subject: [PATCH 25/39] Update query snapshots --- .../models/filters/test/__snapshots__/test_filter.ambr | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/posthog/models/filters/test/__snapshots__/test_filter.ambr b/posthog/models/filters/test/__snapshots__/test_filter.ambr index 059524608acc2..da49276931993 100644 --- a/posthog/models/filters/test/__snapshots__/test_filter.ambr +++ b/posthog/models/filters/test/__snapshots__/test_filter.ambr @@ -18,6 +18,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -71,6 +73,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -124,6 +128,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -177,6 +183,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -230,6 +238,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From 42f2d8fad3c507699c14cca86c05de325cbae7ed Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 21 Oct 2023 11:27:19 +0000 Subject: [PATCH 26/39] Update query snapshots --- posthog/test/__snapshots__/test_feature_flag.ambr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/posthog/test/__snapshots__/test_feature_flag.ambr b/posthog/test/__snapshots__/test_feature_flag.ambr index 2b32e89e7ca13..d34be7dd09692 100644 --- a/posthog/test/__snapshots__/test_feature_flag.ambr +++ b/posthog/test/__snapshots__/test_feature_flag.ambr @@ -18,6 +18,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From faa375af4041a48c05bd5c53180e495b77f8ac0c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 21 Oct 2023 11:27:23 +0000 Subject: [PATCH 27/39] Update query snapshots --- .../test_session_recordings.ambr | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr index 3329a6251185a..e85c11650cf32 100644 --- a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr +++ b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr @@ -47,6 +47,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -196,6 +198,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -278,6 +282,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -569,6 +575,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -651,6 +659,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -941,6 +951,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1023,6 +1035,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1154,6 +1168,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1349,6 +1365,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1460,6 +1478,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1613,6 +1633,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1781,6 +1803,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1863,6 +1887,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2394,6 +2420,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2476,6 +2504,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2759,6 +2789,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2841,6 +2873,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3115,6 +3149,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3208,6 +3244,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3484,6 +3522,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3566,6 +3606,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From 9ddc393c0d51625458124799cc45a7f8f9070edb Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 14:21:33 +0200 Subject: [PATCH 28/39] only return flag key in decide --- posthog/api/decide.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/posthog/api/decide.py b/posthog/api/decide.py index febb1a5961dcf..335594fa64132 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -225,13 +225,17 @@ def get_decide(request: HttpRequest): minimum_duration = team.session_recording_minimum_duration_milliseconds or None + linked_flag = team.session_recording_linked_flag or None + if isinstance(linked_flag, Dict): + linked_flag = linked_flag.get("key") + response["sessionRecording"] = { "endpoint": "/s/", "consoleLogRecordingEnabled": capture_console_logs, "recorderVersion": "v2", "sampleRate": sample_rate, "minimumDurationMilliseconds": minimum_duration, - "linkedFlag": team.session_recording_linked_flag or None, + "linkedFlag": linked_flag, } response["surveys"] = True if team.surveys_opt_in else False From 1e9ee03d16ae9698187eeac59779ec38e1bb2299 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 15:07:07 +0200 Subject: [PATCH 29/39] doh --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d31e65c0c12f4..caf1169dd8f27 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "md5": "^2.3.0", "monaco-editor": "^0.39.0", "papaparse": "^5.4.1", - "posthog-js": "file:.yalc/posthog-js", + "posthog-js": "1.84.1", "posthog-js-lite": "2.0.0-alpha5", "prettier": "^2.8.8", "prop-types": "^15.7.2", From 82cde4d7910a14f736ee32682617817bb63afae9 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 15:17:14 +0200 Subject: [PATCH 30/39] fix --- posthog/api/test/test_decide.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 9e0478a68a0ae..dca9ab98c0f0a 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -138,6 +138,8 @@ def test_user_session_recording_opt_in(self, *args): "recorderVersion": "v2", "consoleLogRecordingEnabled": False, "sampleRate": None, + "linkedFlag": None, + "minimumDurationMilliseconds": None, } self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) @@ -154,6 +156,8 @@ def test_user_console_log_opt_in(self, *args): "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": None, + "linkedFlag": None, + "minimumDurationMilliseconds": None, } def test_user_performance_opt_in(self, *args): @@ -307,6 +311,8 @@ def test_user_session_recording_opt_in_wildcard_domain(self, *args): "recorderVersion": "v2", "consoleLogRecordingEnabled": False, "sampleRate": None, + "linkedFlag": None, + "minimumDurationMilliseconds": None, } self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) @@ -326,6 +332,8 @@ def test_user_session_recording_evil_site(self, *args): "recorderVersion": "v2", "consoleLogRecordingEnabled": False, "sampleRate": None, + "linkedFlag": None, + "minimumDurationMilliseconds": None, } def test_user_autocapture_opt_out(self, *args): @@ -347,6 +355,8 @@ def test_user_session_recording_allowed_when_no_permitted_domains_are_set(self, "recorderVersion": "v2", "consoleLogRecordingEnabled": False, "sampleRate": None, + "linkedFlag": None, + "minimumDurationMilliseconds": None, } def test_user_session_recording_allowed_when_permitted_domains_are_not_http_based(self, *args): @@ -358,6 +368,8 @@ def test_user_session_recording_allowed_when_permitted_domains_are_not_http_base "recorderVersion": "v2", "consoleLogRecordingEnabled": False, "sampleRate": None, + "linkedFlag": None, + "minimumDurationMilliseconds": None, } @snapshot_postgres_queries From d19aa8e251ff40109f0b3fcb999b92357ee63342 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 15:57:10 +0200 Subject: [PATCH 31/39] Fix --- .../__snapshots__/verifiedDomainsLogic.test.ts.snap | 2 ++ frontend/src/scenes/teamLogic.tsx | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap b/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap index 5c49f8cfe384a..4f2b11ec18402 100644 --- a/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap +++ b/frontend/src/scenes/organization/Settings/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap @@ -74,6 +74,8 @@ exports[`verifiedDomainsLogic values has proper defaults 1`] = ` "recording_domains": [ "https://recordings.posthog.com/", ], + "session_recording_linked_flag": null, + "session_recording_minimum_duration_milliseconds": null, "session_recording_opt_in": true, "session_recording_sample_rate": "1.0", "slack_incoming_webhook": "", diff --git a/frontend/src/scenes/teamLogic.tsx b/frontend/src/scenes/teamLogic.tsx index 25775b0825edb..17def88cb67ef 100644 --- a/frontend/src/scenes/teamLogic.tsx +++ b/frontend/src/scenes/teamLogic.tsx @@ -74,8 +74,6 @@ export const teamLogic = kea([ throw new Error('Current team has not been loaded yet, so it cannot be updated!') } - await breakpoint(50) - const patchedTeam = (await api.update(`api/projects/${values.currentTeam.id}`, payload)) as TeamType breakpoint() From 605d058cf1fbb56a5d9ce8d327088c13c1a7814a Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 16:05:10 +0200 Subject: [PATCH 32/39] don't have a restricted list of sample rates --- .../settings/SessionRecordingSettings.tsx | 7 +++---- frontend/src/types.ts | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index da5d6ddaeffbb..9d3171b3b51e1 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -8,7 +8,6 @@ import { LemonDialog } from 'lib/lemon-ui/LemonDialog' import { LemonLabel } from 'lib/lemon-ui/LemonLabel/LemonLabel' import { FlaggedFeature } from 'lib/components/FlaggedFeature' import { FEATURE_FLAGS } from 'lib/constants' -import { SampleRate } from '~/types' import { IconCancel } from 'lib/lemon-ui/icons' import { FlagSelector } from 'lib/components/FlagSelector' @@ -113,7 +112,7 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe Sampling { - updateCurrentTeam({ session_recording_sample_rate: v as SampleRate }) + updateCurrentTeam({ session_recording_sample_rate: v }) }} options={[ { @@ -138,9 +137,9 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe }, ]} value={ - (typeof currentTeam?.session_recording_sample_rate === 'string' + typeof currentTeam?.session_recording_sample_rate === 'string' ? currentTeam?.session_recording_sample_rate - : '1.00') as SampleRate + : '1.00' } /> diff --git a/frontend/src/types.ts b/frontend/src/types.ts index abd4cf0591936..a9393d85a94ec 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -335,8 +335,6 @@ export interface CorrelationConfigType { excluded_event_names?: string[] } -export type SampleRate = '0.25' | '0.5' | '0.75' | '1.0' | undefined - export interface TeamType extends TeamBasicType { created_at: string updated_at: string @@ -348,7 +346,8 @@ export interface TeamType extends TeamBasicType { session_recording_opt_in: boolean capture_console_log_opt_in: boolean capture_performance_opt_in: boolean - session_recording_sample_rate: SampleRate + // a string representation of the decimal value between 0 and 1 + session_recording_sample_rate: string session_recording_minimum_duration_milliseconds: number | null session_recording_linked_flag: Pick | null autocapture_exceptions_opt_in: boolean From 337c11acdd48b94be8386587427dc7aa7df87c96 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sat, 21 Oct 2023 16:08:07 +0200 Subject: [PATCH 33/39] fix --- posthog/api/team.py | 2 +- posthog/api/test/test_team.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/posthog/api/team.py b/posthog/api/team.py index e47bf5a6852e8..679d1230452b4 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -175,7 +175,7 @@ def validate_session_recording_linked_flag(self, value) -> Dict: if not isinstance(value, Dict): raise exceptions.ValidationError("Must provide a dictionary.") if value.keys() != {"id", "key"}: - raise exceptions.ValidationError("Must provide a dictionary with a only: id and key.") + raise exceptions.ValidationError("Must provide a dictionary with only 'id' and 'key' keys.") return value diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index 8b2e99003f755..5887a420f4669 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -536,19 +536,19 @@ def test_invalid_session_recording_minimum_duration( "unexpected json - no id", {"key": "something"}, "invalid_input", - "Must provide a dictionary with a only: id and key.", + "Must provide a dictionary with only 'id' and 'key' keys.", ], [ "unexpected json - no key", {"id": 1}, "invalid_input", - "Must provide a dictionary with a only: id and key.", + "Must provide a dictionary with only 'id' and 'key' keys.", ], [ "unexpected json - neither", {"wat": "wat"}, "invalid_input", - "Must provide a dictionary with a only: id and key.", + "Must provide a dictionary with only 'id' and 'key' keys.", ], ] ) From 3a884aee416a966fe975d1fe98483862c4d1292d Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sun, 22 Oct 2023 12:17:37 +0100 Subject: [PATCH 34/39] fix --- .../api/test/__snapshots__/test_decide.ambr | 55 ++++++++++++------- posthog/api/test/test_decide.py | 40 ++++++++++---- 2 files changed, 63 insertions(+), 32 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index 611f577b258f7..65570e2a14872 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -47,6 +47,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -80,6 +82,22 @@ LIMIT 21 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.10 + ' + SELECT "posthog_pluginconfig"."id", + "posthog_pluginconfig"."web_token", + "posthog_pluginsourcefile"."updated_at", + "posthog_plugin"."updated_at", + "posthog_pluginconfig"."updated_at" + FROM "posthog_pluginconfig" + INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") + INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") + WHERE ("posthog_pluginconfig"."enabled" + AND "posthog_pluginsourcefile"."filename" = 'site.ts' + AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' + AND "posthog_pluginconfig"."team_id" = 2) + ' +--- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.2 ' SELECT "posthog_organizationmembership"."id", @@ -111,6 +129,17 @@ ' --- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.3 + ' + SELECT "posthog_instancesetting"."id", + "posthog_instancesetting"."key", + "posthog_instancesetting"."raw_value" + FROM "posthog_instancesetting" + WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' + ORDER BY "posthog_instancesetting"."id" ASC + LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ + ' +--- +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT (1) AS "a" FROM "posthog_grouptypemapping" @@ -118,7 +147,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -129,7 +158,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -140,7 +169,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -151,7 +180,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -180,7 +209,7 @@ LIMIT 21 ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 ' SELECT "posthog_featureflag"."id", "posthog_featureflag"."key", @@ -203,22 +232,6 @@ AND "posthog_featureflag"."team_id" = 2) ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 - ' - SELECT "posthog_pluginconfig"."id", - "posthog_pluginconfig"."web_token", - "posthog_pluginsourcefile"."updated_at", - "posthog_plugin"."updated_at", - "posthog_pluginconfig"."updated_at" - FROM "posthog_pluginconfig" - INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") - INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") - WHERE ("posthog_pluginconfig"."enabled" - AND "posthog_pluginsourcefile"."filename" = 'site.ts' - AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' - AND "posthog_pluginconfig"."team_id" = 2) - ' ---- # name: TestDecide.test_flag_with_behavioural_cohorts ' SELECT "posthog_user"."id", diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index dca9ab98c0f0a..e3e13458acb54 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -86,13 +86,13 @@ def _post_decide( REMOTE_ADDR=ip, ) - def _update_team(self, data): + def _update_team(self, data, expected_status_code: int = status.HTTP_200_OK): # use a non-csrf client to make requests client = Client() client.force_login(self.user) response = client.patch("/api/projects/@current/", data, content_type="application/json") - self.assertEqual(response.status_code, status.HTTP_200_OK) + self.assertEqual(response.status_code, expected_status_code) client.logout() @@ -219,7 +219,7 @@ def test_session_recording_minimum_duration(self, *args): self._update_team({"session_recording_minimum_duration_milliseconds": 800}) response = self._post_decide().json() - self.assertEqual(response["sessionRecording"]["minimumDurationMilliseconds"], "800") + self.assertEqual(response["sessionRecording"]["minimumDurationMilliseconds"], 800) def test_session_recording_sample_rate_of_0_is_treated_as_no_sampling(self, *args): # :TRICKY: Test for regression around caching @@ -253,7 +253,7 @@ def test_session_recording_linked_flag(self, *args): self._update_team({"session_recording_linked_flag": {"id": 12, "key": "my-flag"}}) response = self._post_decide().json() - self.assertEqual(response["sessionRecording"]["linkedFlag"], {"id": 12, "key": "my-flag"}) + self.assertEqual(response["sessionRecording"]["linkedFlag"], "my-flag") def test_session_recording_empty_linked_flag(self, *args): # :TRICKY: Test for regression around caching @@ -267,10 +267,7 @@ def test_session_recording_empty_linked_flag(self, *args): response = self._post_decide().json() assert response["sessionRecording"]["linkedFlag"] is None - self._update_team({"session_recording_linked_flag": {}}) - - response = self._post_decide().json() - self.assertEqual(response["sessionRecording"]["linkedFlag"], None) + self._update_team({"session_recording_linked_flag": {}}, expected_status_code=status.HTTP_400_BAD_REQUEST) def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching @@ -1898,7 +1895,14 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": "0.20"}, + { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": True, + "sampleRate": "0.20", + "linkedFlag": None, + "minimumDurationMilliseconds": None, + }, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) @@ -1912,7 +1916,14 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": "0.20"}, + { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": True, + "sampleRate": "0.20", + "linkedFlag": None, + "minimumDurationMilliseconds": None, + }, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) @@ -2454,7 +2465,14 @@ def test_decide_doesnt_error_out_when_database_is_down_and_database_check_isnt_c self.assertEqual( response["sessionRecording"], - {"endpoint": "/s/", "recorderVersion": "v2", "consoleLogRecordingEnabled": True, "sampleRate": "0.40"}, + { + "endpoint": "/s/", + "recorderVersion": "v2", + "consoleLogRecordingEnabled": True, + "sampleRate": "0.40", + "linkedFlag": None, + "minimumDurationMilliseconds": None, + }, ) self.assertEqual(response["supportedCompression"], ["gzip", "gzip-js"]) self.assertEqual(response["siteApps"], []) From 3b20ab96d01432173d3da34f9f7c34af545bcbe3 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 11:32:19 +0000 Subject: [PATCH 35/39] Update query snapshots --- .../api/test/__snapshots__/test_action.ambr | 6 +++ .../test/__snapshots__/test_annotation.ambr | 6 +++ .../api/test/__snapshots__/test_decide.ambr | 43 ++++++++++++------- .../test_early_access_feature.ambr | 4 ++ .../api/test/__snapshots__/test_element.ambr | 2 + .../api/test/__snapshots__/test_insight.ambr | 22 ++++++++++ 6 files changed, 67 insertions(+), 16 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_action.ambr b/posthog/api/test/__snapshots__/test_action.ambr index 38ada81e51ecb..6564d9398a50b 100644 --- a/posthog/api/test/__snapshots__/test_action.ambr +++ b/posthog/api/test/__snapshots__/test_action.ambr @@ -47,6 +47,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -198,6 +200,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -520,6 +524,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_annotation.ambr b/posthog/api/test/__snapshots__/test_annotation.ambr index 8364965c89ea5..762469eaa98ff 100644 --- a/posthog/api/test/__snapshots__/test_annotation.ambr +++ b/posthog/api/test/__snapshots__/test_annotation.ambr @@ -47,6 +47,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -122,6 +124,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -442,6 +446,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index 65570e2a14872..119d2cf9bbcd0 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -129,17 +129,6 @@ ' --- # name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.3 - ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ - ' ---- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT (1) AS "a" FROM "posthog_grouptypemapping" @@ -147,7 +136,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -158,7 +147,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -169,7 +158,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6 ' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -180,7 +169,7 @@ LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/ ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -209,7 +198,7 @@ LIMIT 21 ' --- -# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.8 ' SELECT "posthog_featureflag"."id", "posthog_featureflag"."key", @@ -232,6 +221,22 @@ AND "posthog_featureflag"."team_id" = 2) ' --- +# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.9 + ' + SELECT "posthog_pluginconfig"."id", + "posthog_pluginconfig"."web_token", + "posthog_pluginsourcefile"."updated_at", + "posthog_plugin"."updated_at", + "posthog_pluginconfig"."updated_at" + FROM "posthog_pluginconfig" + INNER JOIN "posthog_plugin" ON ("posthog_pluginconfig"."plugin_id" = "posthog_plugin"."id") + INNER JOIN "posthog_pluginsourcefile" ON ("posthog_plugin"."id" = "posthog_pluginsourcefile"."plugin_id") + WHERE ("posthog_pluginconfig"."enabled" + AND "posthog_pluginsourcefile"."filename" = 'site.ts' + AND "posthog_pluginsourcefile"."status" = 'TRANSPILED' + AND "posthog_pluginconfig"."team_id" = 2) + ' +--- # name: TestDecide.test_flag_with_behavioural_cohorts ' SELECT "posthog_user"."id", @@ -281,6 +286,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -432,6 +439,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -578,6 +587,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_early_access_feature.ambr b/posthog/api/test/__snapshots__/test_early_access_feature.ambr index 6a0c49996839a..1b4cf700cdf05 100644 --- a/posthog/api/test/__snapshots__/test_early_access_feature.ambr +++ b/posthog/api/test/__snapshots__/test_early_access_feature.ambr @@ -18,6 +18,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -146,6 +148,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_element.ambr b/posthog/api/test/__snapshots__/test_element.ambr index e7e08174c0f92..4ac868d1be860 100644 --- a/posthog/api/test/__snapshots__/test_element.ambr +++ b/posthog/api/test/__snapshots__/test_element.ambr @@ -47,6 +47,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_insight.ambr b/posthog/api/test/__snapshots__/test_insight.ambr index 1625a7880819d..f8f92a910dfd8 100644 --- a/posthog/api/test/__snapshots__/test_insight.ambr +++ b/posthog/api/test/__snapshots__/test_insight.ambr @@ -645,6 +645,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -691,6 +693,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -813,6 +817,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1039,6 +1045,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1177,6 +1185,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1300,6 +1310,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1404,6 +1416,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1543,6 +1557,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1624,6 +1640,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1704,6 +1722,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1757,6 +1777,8 @@ "posthog_team"."autocapture_exceptions_errors_to_ignore", "posthog_team"."session_recording_opt_in", "posthog_team"."session_recording_sample_rate", + "posthog_team"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", From 933b537c018163f8f4316275c346b3db92cf2728 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Mon, 23 Oct 2023 11:22:02 +0100 Subject: [PATCH 36/39] all the options --- .../settings/SessionRecordingSettings.tsx | 66 ++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 9d3171b3b51e1..7fdd7b594bf48 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -116,7 +116,7 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe }} options={[ { - label: '100%', + label: '100% (no sampling)', value: '1.00', }, { @@ -127,14 +127,78 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe label: '90%', value: '0.90', }, + { + label: '85%', + value: '0.85', + }, { label: '80%', value: '0.80', }, + { + label: '75%', + value: '0.75', + }, + { + label: '70%', + value: '0.70', + }, + { + label: '65%', + value: '0.65', + }, + { + label: '60%', + value: '0.60', + }, + { + label: '55%', + value: '0.55', + }, { label: '50%', value: '0.50', }, + { + label: '45%', + value: '0.45', + }, + { + label: '40%', + value: '0.40', + }, + { + label: '35%', + value: '0.35', + }, + { + label: '30%', + value: '0.30', + }, + { + label: '25%', + value: '0.25', + }, + { + label: '20%', + value: '0.20', + }, + { + label: '15%', + value: '0.15', + }, + { + label: '10%', + value: '0.10', + }, + { + label: '5%', + value: '0.05', + }, + { + label: '0% (replay disabled)', + value: '0.00', + }, ]} value={ typeof currentTeam?.session_recording_sample_rate === 'string' From e5a2714683ac6b3c26445c1f5f4a1e21f3e8811e Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Mon, 23 Oct 2023 11:55:14 +0100 Subject: [PATCH 37/39] review changes --- .../settings/SessionRecordingSettings.tsx | 49 ++++++++++++------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx index 7fdd7b594bf48..785a5c92ec343 100644 --- a/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/session-recordings/settings/SessionRecordingSettings.tsx @@ -1,6 +1,6 @@ import { useActions, useValues } from 'kea' import { teamLogic } from 'scenes/teamLogic' -import { LemonButton, LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' +import { LemonBanner, LemonButton, LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' import { urls } from 'scenes/urls' import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList' import { AuthorizedUrlListType } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic' @@ -108,12 +108,25 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe <> +

Replay ingestion controls

+

+ PostHog offers several tools to let you control the number of recordings you collect and which + users you collect recordings for.{' '} + + Learn more in our docs + +

+ Requires posthog-js version 1.85.0 or greater
Sampling { updateCurrentTeam({ session_recording_sample_rate: v }) }} + dropdownMatchSelectWidth={false} options={[ { label: '100% (no sampling)', @@ -252,24 +265,26 @@ export function SessionRecordingSettings({ inModal = false }: SessionRecordingSe Setting a minimum session duration will ensure that only sessions that last longer than that value are collected. This helps you avoid collecting sessions that are too short to be useful.

-
+
Enable recordings using feature flag - {currentTeam?.session_recording_linked_flag && ( - } - size="small" - status="stealth" - onClick={() => updateCurrentTeam({ session_recording_linked_flag: null })} - aria-label="close" +
+ { + updateCurrentTeam({ session_recording_linked_flag: { id, key } }) + }} /> - )} - { - updateCurrentTeam({ session_recording_linked_flag: { id, key } }) - }} - /> + {currentTeam?.session_recording_linked_flag && ( + } + size="small" + status="stealth" + onClick={() => updateCurrentTeam({ session_recording_linked_flag: null })} + title="Clear selected flag" + /> + )} +

Linking a flag means that recordings will only be collected for users who have the flag enabled. From 545ebae5afa289ff0d0f9f041b856722dbca5b7e Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Tue, 24 Oct 2023 15:29:57 +0100 Subject: [PATCH 38/39] Fix --- posthog/api/team.py | 7 +++++-- posthog/api/test/test_team.py | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/posthog/api/team.py b/posthog/api/team.py index 679d1230452b4..8127313491434 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -171,9 +171,12 @@ def get_has_group_types(self, team: Team) -> bool: def get_groups_on_events_querying_enabled(self, team: Team) -> bool: return groups_on_events_querying_enabled() - def validate_session_recording_linked_flag(self, value) -> Dict: + def validate_session_recording_linked_flag(self, value) -> Dict | None: + if value is None: + return None + if not isinstance(value, Dict): - raise exceptions.ValidationError("Must provide a dictionary.") + raise exceptions.ValidationError("Must provide a dictionary or None.") if value.keys() != {"id", "key"}: raise exceptions.ValidationError("Must provide a dictionary with only 'id' and 'key' keys.") diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index 5887a420f4669..b1ab603d78108 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -564,6 +564,19 @@ def test_invalid_session_recording_linked_flag( "type": "validation_error", } + def test_can_set_and_unset_session_recording_linked_flag(self) -> None: + first_patch_response = self.client.patch( + "/api/projects/@current/", {"session_recording_linked_flag": {"id": 1, "key": "provided_value"}} + ) + assert first_patch_response.status_code == status.HTTP_200_OK + get_response = self.client.get("/api/projects/@current/") + assert get_response.json()["session_recording_linked_flag"] == {"id": 1, "key": "provided_value"} + + response = self.client.patch("/api/projects/@current/", {"session_recording_linked_flag": None}) + assert response.status_code == status.HTTP_200_OK + second_get_response = self.client.get("/api/projects/@current/") + assert second_get_response.json()["session_recording_linked_flag"] is None + def create_team(organization: Organization, name: str = "Test team") -> Team: """ From 71ba595eba4b0f20e0b696673674a62b3b6f56be Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Tue, 24 Oct 2023 17:42:40 +0100 Subject: [PATCH 39/39] fix --- posthog/api/test/test_team.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index b1ab603d78108..052604d151276 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -530,8 +530,8 @@ def test_invalid_session_recording_minimum_duration( @parameterized.expand( [ - ["string", "Marple bridge", "invalid_input", "Must provide a dictionary."], - ["numeric", "-1", "invalid_input", "Must provide a dictionary."], + ["string", "Marple bridge", "invalid_input", "Must provide a dictionary or None."], + ["numeric", "-1", "invalid_input", "Must provide a dictionary or None."], [ "unexpected json - no id", {"key": "something"},