From b1e409b079d4755317dd6c5824a1269f09632e40 Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Tue, 23 Jan 2024 18:04:20 -0800 Subject: [PATCH 01/11] wip --- ee/billing/quota_limiting.py | 90 ++++++++++++++++++++------ ee/billing/test/test_quota_limiting.py | 13 ++-- posthog/utils.py | 4 +- 3 files changed, 81 insertions(+), 26 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index 0809266b1db64..cd4e350fcb663 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -1,5 +1,5 @@ import copy -from datetime import timedelta +from datetime import datetime, timedelta from enum import Enum from typing import Dict, List, Mapping, Optional, Sequence, TypedDict, cast @@ -22,6 +22,11 @@ from posthog.utils import get_current_day QUOTA_LIMITER_CACHE_KEY = "@posthog/quota-limits/" +# We are updating the quota limiting behavior so we retain data for 7 days before +# permanently dropping it. This will allow us to recover data in the case of incidents +# where usage may have inadvertently exceeded a billing limit. +# Ref: INC-144 +QUOTA_OVERAGE_RETENTION_CACHE_KEY = "@posthog/quota-overage-retention/" class QuotaResource(Enum): @@ -37,29 +42,35 @@ class QuotaResource(Enum): } -def replace_limited_team_tokens(resource: QuotaResource, tokens: Mapping[str, int]) -> None: +def replace_limited_team_tokens( + resource: QuotaResource, tokens: Mapping[str, int], cache_key: str = QUOTA_LIMITER_CACHE_KEY +) -> None: pipe = get_client().pipeline() - pipe.delete(f"{QUOTA_LIMITER_CACHE_KEY}{resource.value}") + pipe.delete(f"{cache_key}{resource.value}") if tokens: - pipe.zadd(f"{QUOTA_LIMITER_CACHE_KEY}{resource.value}", tokens) # type: ignore # (zadd takes a Mapping[str, int] but the derived Union type is wrong) + pipe.zadd(f"{cache_key}{resource.value}", tokens) # type: ignore # (zadd takes a Mapping[str, int] but the derived Union type is wrong) pipe.execute() -def add_limited_team_tokens(resource: QuotaResource, tokens: Mapping[str, int]) -> None: +def add_limited_team_tokens( + resource: QuotaResource, tokens: Mapping[str, int], cache_key: str = QUOTA_LIMITER_CACHE_KEY +) -> None: redis_client = get_client() - redis_client.zadd(f"{QUOTA_LIMITER_CACHE_KEY}{resource.value}", tokens) # type: ignore # (zadd takes a Mapping[str, int] but the derived Union type is wrong) + redis_client.zadd(f"{cache_key}{resource.value}", tokens) # type: ignore # (zadd takes a Mapping[str, int] but the derived Union type is wrong) -def remove_limited_team_tokens(resource: QuotaResource, tokens: List[str]) -> None: +def remove_limited_team_tokens( + resource: QuotaResource, tokens: List[str], cache_key: str = QUOTA_LIMITER_CACHE_KEY +) -> None: redis_client = get_client() - redis_client.zrem(f"{QUOTA_LIMITER_CACHE_KEY}{resource.value}", *tokens) + redis_client.zrem(f"{cache_key}{resource.value}", *tokens) @cache_for(timedelta(seconds=30), background_refresh=True) -def list_limited_team_attributes(resource: QuotaResource) -> List[str]: +def list_limited_team_attributes(resource: QuotaResource, cache_key: str = QUOTA_LIMITER_CACHE_KEY) -> List[str]: now = timezone.now() redis_client = get_client() - results = redis_client.zrangebyscore(f"{QUOTA_LIMITER_CACHE_KEY}{resource.value}", min=now.timestamp(), max="+inf") + results = redis_client.zrangebyscore(f"{cache_key}{resource.value}", min=now.timestamp(), max="+inf") return [x.decode("utf-8") for x in results] @@ -69,7 +80,7 @@ class UsageCounters(TypedDict): rows_synced: int -def org_quota_limited_until(organization: Organization, resource: QuotaResource) -> Optional[int]: +def org_quota_limited_until(organization: Organization, resource: QuotaResource, today: datetime) -> Optional[int]: if not organization.usage: return None @@ -78,19 +89,31 @@ def org_quota_limited_until(organization: Organization, resource: QuotaResource) return None usage = summary.get("usage", 0) todays_usage = summary.get("todays_usage", 0) + data_retained_until = summary.get("retained_period_end", None) limit = summary.get("limit") + needs_save = False if limit is None: return None is_quota_limited = usage + todays_usage >= limit + OVERAGE_BUFFER[resource] + billing_period_start = round(dateutil.parser.isoparse(organization.usage["period"][0]).timestamp()) billing_period_end = round(dateutil.parser.isoparse(organization.usage["period"][1]).timestamp()) - if is_quota_limited and organization.never_drop_data: + if not is_quota_limited: return None - if is_quota_limited and billing_period_end: - return billing_period_end + if organization.never_drop_data: + return None + + # Either wasn't set or was set in the previous biling period + if not data_retained_until or data_retained_until - timedelta(days=7) < billing_period_start: + data_retained_until = round((today + timedelta(days=7)).timestamp()) + summary["retained_period_end"] = data_retained_until + needs_save = True + + if billing_period_end: + return billing_period_end, data_retained_until, needs_save return None @@ -211,6 +234,7 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Dict[str, Dict[str, org_report[field] += team_report[field] # type: ignore quota_limited_orgs: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} + data_retained_orgs: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} # We find all orgs that should be rate limited for org_id, todays_report in todays_usage_report.items(): @@ -223,13 +247,20 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Dict[str, Dict[str, org.save(update_fields=["usage"]) for field in ["events", "recordings", "rows_synced"]: - quota_limited_until = org_quota_limited_until(org, QuotaResource(field)) + result = org_quota_limited_until(org, QuotaResource(field), period_start) - if quota_limited_until: - # TODO: Set this rate limit to the end of the billing period + if result: + quota_limited_until, data_retained_until, needs_save = result + + if needs_save: + org.save(update_fields=["usage"]) + + if data_retained_until and data_retained_until >= period_start.timestamp(): + data_retained_orgs[field][org_id] = data_retained_until + elif quota_limited_until: quota_limited_orgs[field][org_id] = quota_limited_until - # Get the current quota limits so we can track to poshog if it changes + # Get the current quota limits so we can track to posthog if it changes orgs_with_changes = set() previously_quota_limited_team_tokens: Dict[str, Dict[str, int]] = { "events": {}, @@ -237,10 +268,20 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Dict[str, Dict[str, "rows_synced": {}, } + previously_data_retained_teams: Dict[str, Dict[str, int]] = { + "events": {}, + "recordings": {}, + "rows_synced": {}, + } + for field in quota_limited_orgs: previously_quota_limited_team_tokens[field] = list_limited_team_attributes(QuotaResource(field)) + previously_data_retained_teams[field] = list_limited_team_attributes( + QuotaResource(field), QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) quota_limited_teams: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} + data_retained_teams: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} # Convert the org ids to team tokens for team in teams: @@ -252,9 +293,14 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Dict[str, Dict[str, # If the team was not previously quota limited, we add it to the list of orgs that were added if team.api_token not in previously_quota_limited_team_tokens[field]: orgs_with_changes.add(org_id) + elif org_id in data_retained_orgs[field]: + data_retained_teams[field][team.api_token] = data_retained_orgs[field][org_id] else: # If the team was previously quota limited, we add it to the list of orgs that were removed - if team.api_token in previously_quota_limited_team_tokens[field]: + if ( + team.api_token in previously_quota_limited_team_tokens[field] + or team.api_token in previously_data_retained_teams[field] + ): orgs_with_changes.add(org_id) for org_id in orgs_with_changes: @@ -272,7 +318,11 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Dict[str, Dict[str, ) if not dry_run: + for field in data_retained_teams: + replace_limited_team_tokens( + QuotaResource(field), data_retained_teams[field], QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) for field in quota_limited_teams: replace_limited_team_tokens(QuotaResource(field), quota_limited_teams[field]) - return quota_limited_orgs + return quota_limited_orgs, data_retained_orgs diff --git a/ee/billing/test/test_quota_limiting.py b/ee/billing/test/test_quota_limiting.py index b8e68c235b2c5..a9e17fbb548e1 100644 --- a/ee/billing/test/test_quota_limiting.py +++ b/ee/billing/test/test_quota_limiting.py @@ -25,6 +25,9 @@ class TestQuotaLimiting(BaseTest): def setUp(self) -> None: super().setUp() self.redis_client = get_client() + self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYevents") + self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYrecordings") + self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYrows_synced") def test_billing_rate_limit_not_set_if_missing_org_usage(self) -> None: with self.settings(USE_TZ=False): @@ -53,6 +56,7 @@ def test_billing_rate_limit_not_set_if_missing_org_usage(self) -> None: assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + @freeze_time("2021-01-25T22:09:14.252Z") def test_billing_rate_limit(self) -> None: with self.settings(USE_TZ=False): self.organization.usage = { @@ -76,11 +80,12 @@ def test_billing_rate_limit(self) -> None: team=self.team, ) time.sleep(1) - result = update_all_org_billing_quotas() + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() org_id = str(self.organization.id) - assert result["events"] == {org_id: 1612137599} - assert result["recordings"] == {} - assert result["rows_synced"] == {} + assert data_retained_orgs["events"] == {org_id: 1612137599} + assert quota_limited_orgs["events"] == {} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [ self.team.api_token.encode("UTF-8") diff --git a/posthog/utils.py b/posthog/utils.py index b8c8d8b9e52f7..d08a6af439ac3 100644 --- a/posthog/utils.py +++ b/posthog/utils.py @@ -157,13 +157,13 @@ def get_current_day(at: Optional[datetime.datetime] = None) -> Tuple[datetime.da at, datetime.time.max, tzinfo=ZoneInfo("UTC"), - ) # very end of the reference day + ) # end of the reference day period_start: datetime.datetime = datetime.datetime.combine( period_end, datetime.time.min, tzinfo=ZoneInfo("UTC"), - ) # very start of the reference day + ) # start of the reference day return (period_start, period_end) From 38132ee502bd04d63fb70adc168da3ea23e8316a Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Tue, 30 Jan 2024 12:27:51 -0800 Subject: [PATCH 02/11] add tests --- ee/billing/quota_limiting.py | 47 ++++-- ee/billing/test/test_quota_limiting.py | 210 ++++++++++++++++++++----- 2 files changed, 201 insertions(+), 56 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index cd4e350fcb663..28c18b1150fe8 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -101,13 +101,22 @@ def org_quota_limited_until(organization: Organization, resource: QuotaResource, billing_period_end = round(dateutil.parser.isoparse(organization.usage["period"][1]).timestamp()) if not is_quota_limited: + # Reset data retention + if data_retained_until: + data_retained_until = None + del summary["retained_period_end"] + needs_save = True + return None, None, True return None if organization.never_drop_data: return None # Either wasn't set or was set in the previous biling period - if not data_retained_until or data_retained_until - timedelta(days=7) < billing_period_start: + if ( + not data_retained_until + or round((datetime.fromtimestamp(data_retained_until) - timedelta(days=7)).timestamp()) < billing_period_start + ): data_retained_until = round((today + timedelta(days=7)).timestamp()) summary["retained_period_end"] = data_retained_until needs_save = True @@ -122,14 +131,25 @@ def sync_org_quota_limits(organization: Organization): if not organization.usage: return None + today_start, _ = get_current_day() for resource in [QuotaResource.EVENTS, QuotaResource.RECORDINGS, QuotaResource.ROWS_SYNCED]: team_attributes = get_team_attribute_by_quota_resource(organization, resource) - quota_limited_until = org_quota_limited_until(organization, resource) - - if quota_limited_until: - add_limited_team_tokens(resource, {x: quota_limited_until for x in team_attributes}) - else: - remove_limited_team_tokens(resource, team_attributes) + result = org_quota_limited_until(organization, resource, today_start) + if result: + quota_limited_until, data_retained_until, needs_save = result + + if needs_save: + organization.save() + if quota_limited_until and data_retained_until < today_start.timestamp(): + add_limited_team_tokens(resource, {x: quota_limited_until for x in team_attributes}) + continue + elif data_retained_until and data_retained_until >= today_start.timestamp(): + add_limited_team_tokens( + resource, {x: quota_limited_until for x in team_attributes}, QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) + continue + remove_limited_team_tokens(resource, team_attributes) + remove_limited_team_tokens(resource, team_attributes, QUOTA_OVERAGE_RETENTION_CACHE_KEY) def get_team_attribute_by_quota_resource(organization: Organization, resource: QuotaResource): @@ -248,17 +268,16 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Dict[str, Dict[str, for field in ["events", "recordings", "rows_synced"]: result = org_quota_limited_until(org, QuotaResource(field), period_start) - if result: quota_limited_until, data_retained_until, needs_save = result - if needs_save: - org.save(update_fields=["usage"]) + if needs_save: + org.save(update_fields=["usage"]) - if data_retained_until and data_retained_until >= period_start.timestamp(): - data_retained_orgs[field][org_id] = data_retained_until - elif quota_limited_until: - quota_limited_orgs[field][org_id] = quota_limited_until + if data_retained_until and data_retained_until >= period_start.timestamp(): + data_retained_orgs[field][org_id] = data_retained_until + elif quota_limited_until: + quota_limited_orgs[field][org_id] = quota_limited_until # Get the current quota limits so we can track to posthog if it changes orgs_with_changes = set() diff --git a/ee/billing/test/test_quota_limiting.py b/ee/billing/test/test_quota_limiting.py index a9e17fbb548e1..44abc6741f103 100644 --- a/ee/billing/test/test_quota_limiting.py +++ b/ee/billing/test/test_quota_limiting.py @@ -8,6 +8,7 @@ from ee.billing.quota_limiting import ( QUOTA_LIMITER_CACHE_KEY, + QUOTA_OVERAGE_RETENTION_CACHE_KEY, QuotaResource, list_limited_team_attributes, org_quota_limited_until, @@ -22,6 +23,8 @@ class TestQuotaLimiting(BaseTest): + CLASS_DATA_LEVEL_SETUP = False + def setUp(self) -> None: super().setUp() self.redis_client = get_client() @@ -47,18 +50,20 @@ def test_billing_rate_limit_not_set_if_missing_org_usage(self) -> None: team=self.team, ) - result = update_all_org_billing_quotas() - assert result["events"] == {} - assert result["recordings"] == {} - assert result["rows_synced"] == {} + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() + assert data_retained_orgs["events"] == {} + assert data_retained_orgs["recordings"] == {} + assert data_retained_orgs["rows_synced"] == {} + assert quota_limited_orgs["events"] == {} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] - @freeze_time("2021-01-25T22:09:14.252Z") def test_billing_rate_limit(self) -> None: - with self.settings(USE_TZ=False): + with self.settings(USE_TZ=False), freeze_time("2021-01-25T22:09:14.252Z"): self.organization.usage = { "events": {"usage": 99, "limit": 100}, "recordings": {"usage": 1, "limit": 100}, @@ -80,26 +85,110 @@ def test_billing_rate_limit(self) -> None: team=self.team, ) time.sleep(1) - quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() org_id = str(self.organization.id) - assert data_retained_orgs["events"] == {org_id: 1612137599} - assert quota_limited_orgs["events"] == {} - assert quota_limited_orgs["recordings"] == {} - assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [ - self.team.api_token.encode("UTF-8") - ] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + with freeze_time("2021-01-25T22:09:14.252Z"): + # Should be data_retained until Feb 1 2021 + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() + assert data_retained_orgs["events"] == {org_id: 1612137600} + assert quota_limited_orgs["events"] == {} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} + + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + + self.organization.refresh_from_db() + assert self.organization.usage == { + "events": {"usage": 99, "limit": 100, "todays_usage": 10, "retained_period_end": 1612137600}, + "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, + "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, + "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], + } - self.organization.refresh_from_db() - assert self.organization.usage == { - "events": {"usage": 99, "limit": 100, "todays_usage": 10}, - "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, - "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, - "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], - } + with freeze_time("2021-01-28T22:09:14.252Z"): + self.organization.usage = { + "events": {"usage": 109, "limit": 100, "retained_period_end": 1612137600}, + "recordings": {"usage": 1, "limit": 100}, + "rows_synced": {"usage": 5, "limit": 100}, + "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], + } + self.organization.save() + # Fast forward three days and should still be data retained until Feb 1 2021 + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() + assert data_retained_orgs["events"] == {org_id: 1612137600} + assert quota_limited_orgs["events"] == {} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} + + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + + self.organization.refresh_from_db() + assert self.organization.usage == { + "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1612137600}, + "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, + "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, + "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], + } + + with freeze_time("2021-02-2T22:09:14.252Z"): + self.organization.usage = { + "events": {"usage": 109, "limit": 100, "retained_period_end": 1612137600}, + "recordings": {"usage": 1, "limit": 100}, + "rows_synced": {"usage": 5, "limit": 100}, + "period": ["2021-01-05T00:00:00Z", "2021-02-05T23:59:59Z"], + } + self.organization.save() + # Fast forward eight days and should no longer be data retained, still in same billing period + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() + assert data_retained_orgs["events"] == {} + assert quota_limited_orgs["events"] == {org_id: 1612569599} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} + + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [ + self.team.api_token.encode("UTF-8") + ] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + + self.organization.refresh_from_db() + assert self.organization.usage == { + "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1612137600}, + "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, + "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, + "period": ["2021-01-05T00:00:00Z", "2021-02-05T23:59:59Z"], + } + + with freeze_time("2021-02-2T22:09:14.252Z"): + self.organization.usage = { + "events": {"usage": 109, "limit": 100, "retained_period_end": 1612137600}, + "recordings": {"usage": 1, "limit": 100}, + "rows_synced": {"usage": 5, "limit": 100}, + "period": ["2021-02-01T00:00:00Z", "2021-02-28T23:59:59Z"], + } + self.organization.save() + # Fast forward eight days and should still be data retained but with updated retention end because of new biling period + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() + assert data_retained_orgs["events"] == {org_id: 1612828800} + assert quota_limited_orgs["events"] == {} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} + + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + + self.organization.refresh_from_db() + assert self.organization.usage == { + "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1612828800}, + "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, + "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, + "period": ["2021-02-01T00:00:00Z", "2021-02-28T23:59:59Z"], + } def test_set_org_usage_summary_updates_correctly(self): self.organization.usage = { @@ -177,9 +266,11 @@ def test_set_org_usage_summary_updates_todays_usage(self): "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } + @freeze_time("2021-01-25T22:09:14.252Z") def test_org_quota_limited_until(self): self.organization.usage = None - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS) is None + today = timezone.now() + assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None self.organization.usage = { "events": {"usage": 99, "limit": 100}, @@ -188,32 +279,46 @@ def test_org_quota_limited_until(self): "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS) is None + assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None self.organization.usage["events"]["usage"] = 120 - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS) == 1612137599 + assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) == (1612137599, 1612217354, True) self.organization.usage["events"]["usage"] = 90 self.organization.usage["events"]["todays_usage"] = 10 - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS) == 1612137599 + assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) == ( + 1612137599, + 1612217354, + False, + ) self.organization.usage["events"]["limit"] = None - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS) is None + assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None self.organization.usage["recordings"]["usage"] = 1099 # Under limit + buffer - assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS) is None + assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS, today) is None self.organization.usage["recordings"]["usage"] = 1100 # Over limit + buffer - assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS) == 1612137599 + assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS, today) == ( + 1612137599, + 1612217354, + True, + ) - assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED) is None + assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED, today) is None self.organization.usage["rows_synced"]["usage"] = 101 - assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED) == 1612137599 + assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED, today) == ( + 1612137599, + 1612217354, + True, + ) + @freeze_time("2021-01-25T22:09:14.252Z") def test_over_quota_but_not_dropped_org(self): self.organization.usage = None - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS) is None + today = timezone.now().timestamp() + assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None self.organization.usage = { "events": {"usage": 100, "limit": 90}, @@ -223,9 +328,9 @@ def test_over_quota_but_not_dropped_org(self): } self.organization.never_drop_data = True - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS) is None - assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS) is None - assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED) is None + assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None + assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS, today) is None + assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED, today) is None # reset for subsequent tests self.organization.never_drop_data = False @@ -252,17 +357,38 @@ def test_sync_org_quota_limits(self): self.organization.usage["events"]["usage"] = 120 self.organization.usage["rows_synced"]["usage"] = 120 sync_org_quota_limits(self.organization) - assert sorted(list_limited_team_attributes(QuotaResource.EVENTS)) == sorted( - ["1234", self.team.api_token, other_team.api_token] - ) + # Org will be data retained. + assert self.organization.usage == { + "events": {"usage": 120, "limit": 100, "retained_period_end": 1610064000}, + "recordings": {"usage": 1, "limit": 100}, + "rows_synced": {"limit": 100, "retained_period_end": 1610064000, "usage": 120}, + "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], + } + assert sorted( + list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + ) == sorted([self.team.api_token, other_team.api_token]) + assert sorted(list_limited_team_attributes(QuotaResource.EVENTS)) == sorted(["1234"]) # rows_synced uses teams, not tokens - assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED)) == sorted( - ["1337", str(self.team.pk), str(other_team.pk)] - ) + assert sorted( + list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + ) == sorted([str(self.team.pk), str(other_team.pk)]) + assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED)) == sorted(["1337"]) self.organization.usage["events"]["usage"] = 80 self.organization.usage["rows_synced"]["usage"] = 36 sync_org_quota_limits(self.organization) + assert self.organization.usage == { + "events": {"usage": 80, "limit": 100}, + "recordings": {"usage": 1, "limit": 100}, + "rows_synced": {"limit": 100, "usage": 36}, + "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], + } assert sorted(list_limited_team_attributes(QuotaResource.EVENTS)) == sorted(["1234"]) + assert sorted( + list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + ) == sorted([]) assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED)) == sorted(["1337"]) + assert sorted( + list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + ) == sorted([]) From 3ef6c85d25177aa92571448a29a8435361067e19 Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Wed, 31 Jan 2024 11:03:13 -0800 Subject: [PATCH 03/11] fix up mypy --- ee/billing/quota_limiting.py | 12 +++++++----- .../management/commands/update_billing_quotas.py | 15 +++++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index 28c18b1150fe8..cf06d532d1ccb 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -1,7 +1,7 @@ import copy from datetime import datetime, timedelta from enum import Enum -from typing import Dict, List, Mapping, Optional, Sequence, TypedDict, cast +from typing import Dict, List, Mapping, Optional, Sequence, Tuple, TypedDict, cast import dateutil.parser from django.db.models import Q @@ -80,7 +80,9 @@ class UsageCounters(TypedDict): rows_synced: int -def org_quota_limited_until(organization: Organization, resource: QuotaResource, today: datetime) -> Optional[int]: +def org_quota_limited_until( + organization: Organization, resource: QuotaResource, today: datetime +) -> Optional[Tuple[Optional[int], Optional[int], Optional[bool]]]: if not organization.usage: return None @@ -140,12 +142,12 @@ def sync_org_quota_limits(organization: Organization): if needs_save: organization.save() - if quota_limited_until and data_retained_until < today_start.timestamp(): + if quota_limited_until and (data_retained_until and data_retained_until < round(today_start.timestamp())): add_limited_team_tokens(resource, {x: quota_limited_until for x in team_attributes}) continue elif data_retained_until and data_retained_until >= today_start.timestamp(): add_limited_team_tokens( - resource, {x: quota_limited_until for x in team_attributes}, QUOTA_OVERAGE_RETENTION_CACHE_KEY + resource, {x: data_retained_until for x in team_attributes}, QUOTA_OVERAGE_RETENTION_CACHE_KEY ) continue remove_limited_team_tokens(resource, team_attributes) @@ -209,7 +211,7 @@ def set_org_usage_summary( return has_changed -def update_all_org_billing_quotas(dry_run: bool = False) -> Dict[str, Dict[str, int]]: +def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict[str, int]], Dict[str, Dict[str, int]]]: period = get_current_day() period_start, period_end = period diff --git a/posthog/management/commands/update_billing_quotas.py b/posthog/management/commands/update_billing_quotas.py index f1330fae071b1..3db86ba01dfff 100644 --- a/posthog/management/commands/update_billing_quotas.py +++ b/posthog/management/commands/update_billing_quotas.py @@ -15,16 +15,19 @@ def add_arguments(self, parser): def handle(self, *args, **options): dry_run = options["dry_run"] - results = update_all_org_billing_quotas(dry_run) + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas(dry_run) if options["print_reports"]: - print("") # noqa T201 - pprint.pprint(results) # noqa T203 - print("") # noqa T201 + print("Quota Limited Orgs") # noqa T201 + pprint.pprint(quota_limited_orgs) # noqa T203 + print("Quota Limiting Suspended Orgs") # noqa T201 + pprint.pprint(data_retained_orgs) # noqa T203 if dry_run: print("Dry run so not stored.") # noqa T201 else: - print(f"{len(results['events'])} orgs rate limited for events") # noqa T201 - print(f"{len(results['recordings'])} orgs rate limited for recordings") # noqa T201 + print(f"{len(quota_limited_orgs['events'])} orgs rate limited for events") # noqa T201 + print(f"{len(data_retained_orgs['events'])} orgs quota limiting suspended for events") # noqa T201 + print(f"{len(quota_limited_orgs['recordings'])} orgs rate limited for recordings") # noqa T201 + print(f"{len(data_retained_orgs['recordings'])} orgs quota limiting suspended for recordings") # noqa T201 print("Done!") # noqa T201 From 4c01d87fb802300ff11616ffbb691d9a1b627146 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:09:24 +0000 Subject: [PATCH 04/11] Update query snapshots --- .../__snapshots__/test_dashboard.ambr | 2084 ++++++++--------- 1 file changed, 1042 insertions(+), 1042 deletions(-) diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index bf434e1e14bc0..007c067b2496c 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -2899,6 +2899,58 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.100 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + 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.101 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -2933,7 +2985,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.101 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.102 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -2992,7 +3044,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.102 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.103 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3003,7 +3055,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.103 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.104 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3014,7 +3066,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.104 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.105 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3025,7 +3077,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.105 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.106 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3036,7 +3088,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.106 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.107 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3047,7 +3099,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.107 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.108 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3058,7 +3110,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.108 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.109 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -3085,65 +3137,6 @@ 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.109 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."plugins_opt_in", - "posthog_team"."opt_out_capture", - "posthog_team"."event_names", - "posthog_team"."event_names_with_usage", - "posthog_team"."event_properties", - "posthog_team"."event_properties_with_usage", - "posthog_team"."event_properties_numerical", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - 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.11 ''' SELECT "posthog_dashboardtile"."id", @@ -3372,6 +3365,65 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."plugins_opt_in", + "posthog_team"."opt_out_capture", + "posthog_team"."event_names", + "posthog_team"."event_names_with_usage", + "posthog_team"."event_properties", + "posthog_team"."event_properties_with_usage", + "posthog_team"."event_properties_numerical", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + 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.112 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3382,7 +3434,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.112 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3393,7 +3445,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.113 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3404,7 +3456,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.114 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3415,7 +3467,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.115 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.116 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3426,7 +3478,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.116 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.117 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3437,7 +3489,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.117 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -3489,7 +3541,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.118 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.119 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -3507,7 +3559,15 @@ 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.119 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.12 + ''' + 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.120 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -3542,15 +3602,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.12 - ''' - 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.120 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.121 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -3573,7 +3625,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.121 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -3632,7 +3684,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.122 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.123 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3643,7 +3695,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.123 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3654,7 +3706,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.124 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.125 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3665,7 +3717,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.125 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.126 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3676,7 +3728,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.126 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.127 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3687,7 +3739,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.127 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.128 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3698,7 +3750,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.128 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.129 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -3722,31 +3774,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.129 - ''' - 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" - INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") - WHERE (NOT ("posthog_dashboard"."deleted") - 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.13 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -3778,6 +3806,30 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.130 + ''' + 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" + INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") + WHERE (NOT ("posthog_dashboard"."deleted") + 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.131 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -3798,24 +3850,13 @@ 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.131 - ''' - 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.132 ''' 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'*/ ''' @@ -3826,7 +3867,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'*/ ''' @@ -3837,7 +3878,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'*/ ''' @@ -3848,7 +3889,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'*/ ''' @@ -3859,7 +3900,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'*/ ''' @@ -3870,7 +3911,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'*/ ''' @@ -3881,7 +3922,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'*/ ''' @@ -3892,7 +3933,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'*/ ''' @@ -3955,7 +3996,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'*/ ''' @@ -3966,7 +4007,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'*/ ''' @@ -3977,12 +4018,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_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.143 + ''' + 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.144 ''' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -3993,7 +4045,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.144 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.145 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -4020,7 +4072,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.145 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.146 ''' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -4028,7 +4080,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.146 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.147 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -4059,7 +4111,7 @@ LIMIT 21 /**/ ''' # --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.147 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.148 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4111,7 +4163,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.148 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.149 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -4141,30 +4193,6 @@ WHERE "posthog_organizationmembership"."user_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.149 - ''' - 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 (NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboard"."id" = 2) - 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.15 ''' SELECT "posthog_organizationmembership"."id", @@ -4196,6 +4224,30 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.150 + ''' + 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 (NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboard"."id" = 2) + 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.151 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4247,7 +4299,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.151 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.152 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -4282,7 +4334,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.152 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.153 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4341,7 +4393,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.153 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.154 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4352,7 +4404,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.154 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.155 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4363,7 +4415,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.155 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.156 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4374,7 +4426,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.156 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.157 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4385,7 +4437,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.157 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.158 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4396,7 +4448,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.158 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.159 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4407,7 +4459,18 @@ 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.159 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.16 + ''' + 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_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.160 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -4434,18 +4497,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.16 - ''' - SELECT "posthog_dashboardtile"."id" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."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.160 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.161 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4504,7 +4556,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.161 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.162 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4563,7 +4615,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.162 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.163 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4574,7 +4626,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.163 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.164 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4585,7 +4637,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.164 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.165 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4596,7 +4648,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.165 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.166 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4607,7 +4659,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.166 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.167 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4618,7 +4670,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.167 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.168 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4629,7 +4681,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.168 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.169 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4681,7 +4733,18 @@ 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.169 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17 + ''' + SELECT "posthog_dashboardtile"."id" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."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.170 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -4699,31 +4762,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.17 - ''' - SELECT "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist", - "posthog_organization"."available_features" - FROM "posthog_organization" - WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - LIMIT 21 /*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.170 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.171 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -4758,7 +4797,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.171 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.172 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -4781,7 +4820,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.172 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4840,7 +4879,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.173 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.174 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4851,7 +4890,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.174 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.175 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4862,7 +4901,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.175 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.176 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4873,7 +4912,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.176 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.177 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4884,7 +4923,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.177 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.178 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4895,7 +4934,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.178 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.179 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4906,7 +4945,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.179 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.18 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -4927,22 +4966,34 @@ "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + LIMIT 21 /*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.18 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.180 ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."dashboard_id" = 2 - AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + SELECT "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + 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.180 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.181 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -4966,7 +5017,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.181 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.182 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -4987,7 +5038,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.182 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.183 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4998,7 +5049,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.183 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.184 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5009,7 +5060,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.184 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.185 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5020,7 +5071,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.185 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.186 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5031,7 +5082,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.186 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.187 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5042,7 +5093,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.187 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.188 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5053,7 +5104,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.188 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.189 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5064,7 +5115,19 @@ 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.189 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.19 + ''' + SELECT COUNT(*) AS "__count" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."dashboard_id" = 2 + AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*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.190 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5075,21 +5138,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.19 - ''' - 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.190 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.191 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5100,7 +5149,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.191 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.192 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5111,7 +5160,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.192 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.193 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5122,7 +5171,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.193 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.194 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5133,7 +5182,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.194 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.195 ''' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -5144,7 +5193,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.195 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.196 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5171,7 +5220,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.196 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.197 ''' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -5179,7 +5228,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.197 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.198 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -5210,7 +5259,7 @@ LIMIT 21 /**/ ''' # --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.198 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.199 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5262,7 +5311,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.199 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.2 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -5289,10 +5338,24 @@ "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") - WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + WHERE "posthog_organizationmembership"."user_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.2 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.20 + ''' + 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.200 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -5319,17 +5382,10 @@ "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") - WHERE "posthog_organizationmembership"."user_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.20 - ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_taggeditem" - 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'*/ + WHERE "posthog_organizationmembership"."user_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.200 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.201 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5353,7 +5409,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", @@ -5405,7 +5461,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", @@ -5440,7 +5496,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", @@ -5499,7 +5555,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.205 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5510,7 +5566,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.205 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.206 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5521,7 +5577,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.207 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5532,7 +5588,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.208 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5543,7 +5599,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.209 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5554,7 +5610,14 @@ 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.21 + ''' + SELECT COUNT(*) AS "__count" + FROM "posthog_taggeditem" + 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.210 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5565,66 +5628,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.21 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."plugins_opt_in", - "posthog_team"."opt_out_capture", - "posthog_team"."event_names", - "posthog_team"."event_names_with_usage", - "posthog_team"."event_properties", - "posthog_team"."event_properties_with_usage", - "posthog_team"."event_properties_numerical", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - LIMIT 21 /*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.210 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.211 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5651,7 +5655,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", @@ -5710,7 +5714,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", @@ -5769,7 +5773,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", @@ -5780,7 +5784,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", @@ -5791,7 +5795,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", @@ -5802,7 +5806,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", @@ -5813,7 +5817,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", @@ -5824,7 +5828,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", @@ -5835,7 +5839,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.22 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5880,46 +5884,91 @@ "posthog_team"."extra_settings", "posthog_team"."correlation_config", "posthog_team"."session_recording_retention_period_days", + "posthog_team"."plugins_opt_in", + "posthog_team"."opt_out_capture", + "posthog_team"."event_names", + "posthog_team"."event_names_with_usage", + "posthog_team"."event_properties", + "posthog_team"."event_properties_with_usage", + "posthog_team"."event_properties_numerical", "posthog_team"."external_data_workspace_id", "posthog_team"."external_data_workspace_last_synced_at" FROM "posthog_team" WHERE "posthog_team"."id" = 2 - 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'*/ + LIMIT 21 /*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", - "posthog_dashboardtile"."insight_id", - "posthog_dashboardtile"."text_id", - "posthog_dashboardtile"."layouts", - "posthog_dashboardtile"."color", - "posthog_dashboardtile"."filters_hash", - "posthog_dashboardtile"."last_refresh", - "posthog_dashboardtile"."refreshing", - "posthog_dashboardtile"."refresh_attempt", - "posthog_dashboardtile"."deleted" + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + 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 + ''' + SELECT "posthog_dashboardtile"."id", + "posthog_dashboardtile"."dashboard_id", + "posthog_dashboardtile"."insight_id", + "posthog_dashboardtile"."text_id", + "posthog_dashboardtile"."layouts", + "posthog_dashboardtile"."color", + "posthog_dashboardtile"."filters_hash", + "posthog_dashboardtile"."last_refresh", + "posthog_dashboardtile"."refreshing", + "posthog_dashboardtile"."refresh_attempt", + "posthog_dashboardtile"."deleted" FROM "posthog_dashboardtile" WHERE "posthog_dashboardtile"."id" = 2 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", @@ -5954,7 +6003,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", @@ -5977,7 +6026,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", @@ -6036,7 +6085,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.225 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6047,7 +6096,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.225 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.226 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6058,7 +6107,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.227 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6069,7 +6118,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.228 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6080,7 +6129,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.229 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6091,7 +6140,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.229 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.23 + ''' + 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.230 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6102,7 +6165,142 @@ 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 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.231 + ''' + SELECT "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + 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 + ''' + 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" + INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") + WHERE (NOT ("posthog_dashboard"."deleted") + 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 + ''' + SELECT "posthog_dashboardtile"."id", + "posthog_dashboardtile"."dashboard_id", + "posthog_dashboardtile"."insight_id", + "posthog_dashboardtile"."text_id", + "posthog_dashboardtile"."layouts", + "posthog_dashboardtile"."color", + "posthog_dashboardtile"."filters_hash", + "posthog_dashboardtile"."last_refresh", + "posthog_dashboardtile"."refreshing", + "posthog_dashboardtile"."refresh_attempt", + "posthog_dashboardtile"."deleted" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + 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 + ''' + 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.235 + ''' + 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.236 + ''' + 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.237 + ''' + 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.238 + ''' + 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.239 + ''' + 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.24 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6270,142 +6468,7 @@ ORDER BY "posthog_dashboarditem"."order" ASC /*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.230 - ''' - SELECT "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist", - "posthog_organization"."available_features" - FROM "posthog_organization" - WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - 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 - ''' - 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" - INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") - WHERE (NOT ("posthog_dashboard"."deleted") - 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 - ''' - SELECT "posthog_dashboardtile"."id", - "posthog_dashboardtile"."dashboard_id", - "posthog_dashboardtile"."insight_id", - "posthog_dashboardtile"."text_id", - "posthog_dashboardtile"."layouts", - "posthog_dashboardtile"."color", - "posthog_dashboardtile"."filters_hash", - "posthog_dashboardtile"."last_refresh", - "posthog_dashboardtile"."refreshing", - "posthog_dashboardtile"."refresh_attempt", - "posthog_dashboardtile"."deleted" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - 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 - ''' - 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.234 - ''' - 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.235 - ''' - 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.236 - ''' - 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.237 - ''' - 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.238 - ''' - 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.239 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.240 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6416,15 +6479,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", @@ -6435,7 +6490,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", @@ -6446,7 +6501,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", @@ -6457,7 +6512,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", @@ -6468,7 +6523,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", @@ -6479,7 +6534,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" @@ -6490,7 +6545,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", @@ -6517,7 +6572,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" @@ -6525,7 +6580,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", @@ -6556,7 +6611,15 @@ 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_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.250 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -6608,38 +6671,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"."strapi_id", - "posthog_user"."email_opt_in", - "posthog_user"."theme_mode", - "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", @@ -6669,7 +6701,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", @@ -6693,7 +6725,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", @@ -6815,7 +6847,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", @@ -6837,7 +6869,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", @@ -6855,7 +6887,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", @@ -7028,7 +7060,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", @@ -7049,7 +7081,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", @@ -7156,7 +7188,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", @@ -7181,7 +7213,38 @@ 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.26 + ''' + 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"."strapi_id", + "posthog_user"."email_opt_in", + "posthog_user"."theme_mode", + "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.260 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7207,59 +7270,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.26 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - 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.260 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.261 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -7430,7 +7441,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", @@ -7451,7 +7462,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", @@ -7558,7 +7569,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", @@ -7583,7 +7594,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", @@ -7609,7 +7620,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", @@ -7631,7 +7642,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.267 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7642,7 +7653,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.267 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.268 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7653,7 +7664,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.269 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7664,7 +7675,59 @@ 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.27 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + 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.270 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7675,7 +7738,122 @@ 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 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.271 + ''' + 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.272 + ''' + 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.273 + ''' + 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.274 + ''' + 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.275 + ''' + 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.276 + ''' + 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.277 + ''' + 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.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", + "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 (NOT ("posthog_dashboard"."deleted") + AND "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.28 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -7705,7 +7883,7 @@ WHERE "posthog_organizationmembership"."user_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.270 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.280 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7716,7 +7894,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.271 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.281 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7727,7 +7905,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.282 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7738,7 +7916,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.283 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7749,7 +7927,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.284 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7760,7 +7938,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.285 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7771,7 +7949,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.286 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7782,7 +7960,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.287 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7793,45 +7971,29 @@ 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.288 ''' - 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 (NOT ("posthog_dashboard"."deleted") - AND "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'*/ + 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.279 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.289 ''' 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' + 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.28 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.29 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7855,7 +8017,18 @@ 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.280 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.290 + ''' + 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.291 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7866,7 +8039,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.281 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.292 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7877,7 +8050,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.282 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.293 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7888,7 +8061,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.283 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.294 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7899,7 +8072,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.284 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.295 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7910,7 +8083,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.285 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.296 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7921,7 +8094,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.286 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.297 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7932,7 +8105,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.287 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.298 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7943,7 +8116,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.288 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.299 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7954,18 +8127,18 @@ 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.289 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.3 ''' 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' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_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'*/ + LIMIT 1 /*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.29 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.30 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7989,18 +8162,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.290 - ''' - 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.291 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.300 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8011,7 +8173,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.292 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.301 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8022,7 +8184,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.293 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.302 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8033,7 +8195,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.294 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.303 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8044,7 +8206,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.295 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.304 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8055,7 +8217,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.296 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.305 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8066,7 +8228,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.297 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.306 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8077,7 +8239,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.298 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.307 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8088,7 +8250,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.299 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.308 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8099,18 +8261,18 @@ 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.3 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.309 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + 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.30 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.31 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8162,40 +8324,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.300 - ''' - 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.301 - ''' - 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.302 - ''' - 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.303 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.310 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8206,7 +8335,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.304 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.311 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8217,7 +8346,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.305 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.312 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8228,7 +8357,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.306 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.313 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8239,7 +8368,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.307 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.314 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8250,7 +8379,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.308 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.315 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8261,18 +8390,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.309 - ''' - 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.31 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.32 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -8307,73 +8425,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.310 - ''' - 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.311 - ''' - 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.312 - ''' - 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.313 - ''' - 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.314 - ''' - 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.315 - ''' - 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.32 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.33 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8432,7 +8484,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.33 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.34 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8443,7 +8495,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.34 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.35 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8454,7 +8506,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.35 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.36 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8465,7 +8517,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.36 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.37 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8476,7 +8528,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.37 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.38 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8487,7 +8539,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.38 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.39 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8498,7 +8550,18 @@ 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.39 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.4 + ''' + SELECT "posthog_dashboardtile"."id" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."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.40 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -8525,18 +8588,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.4 - ''' - SELECT "posthog_dashboardtile"."id" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."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.40 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.41 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8595,7 +8647,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.41 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.42 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8654,7 +8706,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.42 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.43 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8665,7 +8717,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.43 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.44 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8676,7 +8728,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.44 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.45 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8687,7 +8739,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.45 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.46 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8698,7 +8750,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.46 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.47 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8709,7 +8761,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.47 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.48 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8720,7 +8772,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.48 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.49 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8763,30 +8815,12 @@ "posthog_team"."recording_domains", "posthog_team"."primary_dashboard_id", "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - 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.49 - ''' - SELECT "posthog_dashboardtile"."id", - "posthog_dashboardtile"."dashboard_id", - "posthog_dashboardtile"."insight_id", - "posthog_dashboardtile"."text_id", - "posthog_dashboardtile"."layouts", - "posthog_dashboardtile"."color", - "posthog_dashboardtile"."filters_hash", - "posthog_dashboardtile"."last_refresh", - "posthog_dashboardtile"."refreshing", - "posthog_dashboardtile"."refresh_attempt", - "posthog_dashboardtile"."deleted" - FROM "posthog_dashboardtile" - WHERE "posthog_dashboardtile"."id" = 2 + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ ''' # --- @@ -8815,6 +8849,24 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.50 + ''' + SELECT "posthog_dashboardtile"."id", + "posthog_dashboardtile"."dashboard_id", + "posthog_dashboardtile"."insight_id", + "posthog_dashboardtile"."text_id", + "posthog_dashboardtile"."layouts", + "posthog_dashboardtile"."color", + "posthog_dashboardtile"."filters_hash", + "posthog_dashboardtile"."last_refresh", + "posthog_dashboardtile"."refreshing", + "posthog_dashboardtile"."refresh_attempt", + "posthog_dashboardtile"."deleted" + FROM "posthog_dashboardtile" + WHERE "posthog_dashboardtile"."id" = 2 + 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.51 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -8849,7 +8901,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.51 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.52 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -8872,7 +8924,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.52 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.53 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8931,7 +8983,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.53 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.54 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8942,7 +8994,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.54 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.55 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8953,7 +9005,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.55 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.56 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8964,7 +9016,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.56 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.57 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8975,7 +9027,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.57 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.58 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8986,7 +9038,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.58 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.59 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8997,7 +9049,19 @@ 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.59 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.6 + ''' + SELECT COUNT(*) AS "__count" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."dashboard_id" = 2 + AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*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.60 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9056,19 +9120,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.6 - ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."dashboard_id" = 2 - AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*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.60 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.61 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9079,7 +9131,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.61 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.62 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9090,7 +9142,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.62 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.63 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9101,7 +9153,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.63 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.64 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9112,7 +9164,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.64 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.65 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9123,7 +9175,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.65 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.66 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9134,7 +9186,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.66 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.67 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9186,7 +9238,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.67 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.68 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -9204,7 +9256,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.68 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.69 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -9239,7 +9291,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.69 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.7 + ''' + 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.70 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9262,21 +9328,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.7 - ''' - 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.70 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.71 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9335,7 +9387,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.71 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.72 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9346,7 +9398,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.72 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.73 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9357,7 +9409,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.73 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.74 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9368,7 +9420,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.74 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.75 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9379,7 +9431,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.75 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.76 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9390,7 +9442,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.76 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.77 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9401,7 +9453,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.77 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.78 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -9425,7 +9477,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.78 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.79 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9449,7 +9501,14 @@ 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.79 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.8 + ''' + SELECT COUNT(*) AS "__count" + FROM "posthog_taggeditem" + 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.80 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -9470,31 +9529,13 @@ 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.8 - ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_taggeditem" - 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.80 - ''' - 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.81 ''' 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'*/ ''' @@ -9505,7 +9546,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'*/ ''' @@ -9516,7 +9557,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'*/ ''' @@ -9527,7 +9568,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'*/ ''' @@ -9538,7 +9579,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'*/ ''' @@ -9549,7 +9590,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'*/ ''' @@ -9560,7 +9601,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'*/ ''' @@ -9571,7 +9612,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'*/ ''' @@ -9582,7 +9623,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'*/ ''' @@ -9652,7 +9693,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'*/ ''' @@ -9663,12 +9704,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_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.92 + ''' + 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.93 ''' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -9679,7 +9731,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.93 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.94 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9706,7 +9758,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.94 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.95 ''' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -9714,7 +9766,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.95 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.96 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -9745,7 +9797,7 @@ LIMIT 21 /**/ ''' # --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.96 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.97 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9797,7 +9849,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.97 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -9827,7 +9879,7 @@ WHERE "posthog_organizationmembership"."user_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.98 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.99 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9851,58 +9903,6 @@ 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.99 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - 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_retrieve_dashboard ''' SELECT "posthog_dashboardtile"."id" From 20b334866e4783a081f78014c245f11fc861d113 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:23:58 +0000 Subject: [PATCH 05/11] Update query snapshots --- .../__snapshots__/test_dashboard.ambr | 2088 ++++++++--------- 1 file changed, 1044 insertions(+), 1044 deletions(-) diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index 007c067b2496c..bf434e1e14bc0 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -2899,58 +2899,6 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.100 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - 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.101 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -2985,7 +2933,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.102 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.101 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -3044,7 +2992,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.103 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.102 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3055,7 +3003,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.104 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.103 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3066,7 +3014,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.105 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.104 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3077,7 +3025,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.106 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.105 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3088,7 +3036,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.107 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.106 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3099,7 +3047,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.108 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.107 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3110,7 +3058,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.109 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.108 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -3137,6 +3085,65 @@ 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.109 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."plugins_opt_in", + "posthog_team"."opt_out_capture", + "posthog_team"."event_names", + "posthog_team"."event_names_with_usage", + "posthog_team"."event_properties", + "posthog_team"."event_properties_with_usage", + "posthog_team"."event_properties_numerical", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + 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.11 ''' SELECT "posthog_dashboardtile"."id", @@ -3365,65 +3372,6 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."plugins_opt_in", - "posthog_team"."opt_out_capture", - "posthog_team"."event_names", - "posthog_team"."event_names_with_usage", - "posthog_team"."event_properties", - "posthog_team"."event_properties_with_usage", - "posthog_team"."event_properties_numerical", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - 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.112 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3434,7 +3382,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.113 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.112 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3445,7 +3393,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.114 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3456,7 +3404,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.115 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3467,7 +3415,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.116 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3478,7 +3426,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.117 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.116 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3489,7 +3437,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.118 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.117 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -3541,7 +3489,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.119 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -3559,15 +3507,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.12 - ''' - 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.120 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.119 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -3602,7 +3542,15 @@ 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.121 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.12 + ''' + 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.120 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -3625,7 +3573,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.122 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.121 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -3684,7 +3632,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.123 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3695,7 +3643,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.124 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.123 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3706,7 +3654,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.125 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3717,7 +3665,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.126 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.125 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3728,7 +3676,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.127 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.126 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3739,7 +3687,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.128 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.127 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3750,7 +3698,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.129 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.128 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -3774,38 +3722,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.13 - ''' - 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"."strapi_id", - "posthog_user"."email_opt_in", - "posthog_user"."theme_mode", - "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.130 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.129 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -3829,7 +3746,38 @@ 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.131 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13 + ''' + 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"."strapi_id", + "posthog_user"."email_opt_in", + "posthog_user"."theme_mode", + "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.130 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -3850,7 +3798,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.132 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.131 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3861,7 +3809,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.133 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.132 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3872,7 +3820,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.134 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.133 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3883,7 +3831,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.135 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.134 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3894,7 +3842,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.136 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.135 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3905,7 +3853,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.137 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.136 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3916,7 +3864,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.138 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.137 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3927,7 +3875,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.139 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.138 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -3938,6 +3886,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.139 + ''' + 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.14 ''' SELECT "posthog_team"."id", @@ -3991,17 +3950,6 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.140 - ''' - 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.141 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4012,7 +3960,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.142 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.141 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4023,7 +3971,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.143 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.142 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4034,7 +3982,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.144 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.143 ''' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -4045,7 +3993,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.145 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.144 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -4072,7 +4020,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.146 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.145 ''' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -4080,7 +4028,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.147 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.146 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -4111,7 +4059,7 @@ LIMIT 21 /**/ ''' # --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.148 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.147 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4163,7 +4111,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.149 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.148 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -4193,6 +4141,30 @@ WHERE "posthog_organizationmembership"."user_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.149 + ''' + 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 (NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboard"."id" = 2) + 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.15 ''' SELECT "posthog_organizationmembership"."id", @@ -4224,30 +4196,6 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.150 - ''' - 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 (NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboard"."id" = 2) - 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.151 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4299,7 +4247,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.152 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.151 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -4334,7 +4282,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.153 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.152 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4393,7 +4341,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.154 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.153 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4404,7 +4352,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.155 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.154 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4415,7 +4363,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.156 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.155 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4426,7 +4374,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.157 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.156 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4437,7 +4385,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.158 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.157 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4448,7 +4396,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.159 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.158 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4459,18 +4407,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.16 - ''' - 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_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.160 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.159 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -4497,7 +4434,18 @@ 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.161 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.16 + ''' + SELECT "posthog_dashboardtile"."id" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."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.160 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4556,7 +4504,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.162 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.161 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4615,7 +4563,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.163 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.162 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4626,7 +4574,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.164 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.163 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4637,7 +4585,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.165 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.164 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4648,7 +4596,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.166 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.165 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4659,7 +4607,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.167 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.166 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4670,7 +4618,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.168 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.167 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4681,7 +4629,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.169 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.168 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4733,18 +4681,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.17 - ''' - SELECT "posthog_dashboardtile"."id" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."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.170 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.169 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -4762,7 +4699,31 @@ 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.171 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17 + ''' + SELECT "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + LIMIT 21 /*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.170 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -4797,7 +4758,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.172 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.171 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -4820,7 +4781,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.173 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.172 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4879,7 +4840,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.174 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4890,7 +4851,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.175 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.174 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4901,7 +4862,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.176 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.175 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4912,7 +4873,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.177 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.176 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4923,7 +4884,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.178 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.177 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4934,7 +4895,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.179 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.178 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -4945,7 +4906,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.18 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.179 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -4966,34 +4927,22 @@ "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + 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.180 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.18 ''' - SELECT "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist", - "posthog_organization"."available_features" - FROM "posthog_organization" - WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + SELECT COUNT(*) AS "__count" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."dashboard_id" = 2 + AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*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.181 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.180 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5017,7 +4966,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.182 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.181 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -5038,7 +4987,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.183 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.182 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5049,7 +4998,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.184 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.183 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5060,7 +5009,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.185 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.184 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5071,7 +5020,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.186 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.185 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5082,7 +5031,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.187 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.186 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5093,7 +5042,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.188 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.187 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5104,7 +5053,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.189 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.188 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5115,19 +5064,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.19 - ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."dashboard_id" = 2 - AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*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.190 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.189 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5138,7 +5075,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.191 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.19 + ''' + 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.190 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5149,7 +5100,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.192 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.191 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5160,7 +5111,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.193 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.192 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5171,7 +5122,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.194 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.193 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5182,7 +5133,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.195 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.194 ''' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -5193,7 +5144,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.196 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.195 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5220,7 +5171,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.197 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.196 ''' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -5228,7 +5179,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.198 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.197 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -5259,7 +5210,7 @@ LIMIT 21 /**/ ''' # --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.199 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.198 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5311,7 +5262,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.2 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.199 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -5338,24 +5289,10 @@ "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") - WHERE "posthog_organizationmembership"."user_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.20 - ''' - 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'*/ + WHERE "posthog_organizationmembership"."user_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.200 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.2 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -5382,10 +5319,17 @@ "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") - WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + WHERE "posthog_organizationmembership"."user_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.201 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.20 + ''' + SELECT COUNT(*) AS "__count" + FROM "posthog_taggeditem" + 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.200 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5409,7 +5353,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", @@ -5461,7 +5405,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", @@ -5496,7 +5440,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", @@ -5555,7 +5499,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", @@ -5566,7 +5510,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", @@ -5577,7 +5521,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", @@ -5588,7 +5532,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", @@ -5599,7 +5543,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", @@ -5610,14 +5554,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.21 - ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_taggeditem" - 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.210 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.209 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -5628,7 +5565,66 @@ 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 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.21 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."plugins_opt_in", + "posthog_team"."opt_out_capture", + "posthog_team"."event_names", + "posthog_team"."event_names_with_usage", + "posthog_team"."event_properties", + "posthog_team"."event_properties_with_usage", + "posthog_team"."event_properties_numerical", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + LIMIT 21 /*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.210 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -5655,7 +5651,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", @@ -5714,7 +5710,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", @@ -5773,7 +5769,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", @@ -5784,7 +5780,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", @@ -5795,7 +5791,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", @@ -5806,7 +5802,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", @@ -5817,7 +5813,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", @@ -5828,7 +5824,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", @@ -5839,7 +5835,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 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.219 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5884,73 +5880,28 @@ "posthog_team"."extra_settings", "posthog_team"."correlation_config", "posthog_team"."session_recording_retention_period_days", - "posthog_team"."plugins_opt_in", - "posthog_team"."opt_out_capture", - "posthog_team"."event_names", - "posthog_team"."event_names_with_usage", - "posthog_team"."event_properties", - "posthog_team"."event_properties_with_usage", - "posthog_team"."event_properties_numerical", "posthog_team"."external_data_workspace_id", "posthog_team"."external_data_workspace_last_synced_at" FROM "posthog_team" WHERE "posthog_team"."id" = 2 - LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + 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.220 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22 ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ + 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.221 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.220 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -5968,7 +5919,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", @@ -6003,7 +5954,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", @@ -6026,7 +5977,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", @@ -6085,156 +6036,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 - ''' - 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.226 - ''' - 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.227 - ''' - 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.228 - ''' - 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.229 - ''' - 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.23 - ''' - 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.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", - "posthog_organization"."slug", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist", - "posthog_organization"."available_features" - FROM "posthog_organization" - WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - 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 - ''' - 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" - INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") - WHERE (NOT ("posthog_dashboard"."deleted") - 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 - ''' - SELECT "posthog_dashboardtile"."id", - "posthog_dashboardtile"."dashboard_id", - "posthog_dashboardtile"."insight_id", - "posthog_dashboardtile"."text_id", - "posthog_dashboardtile"."layouts", - "posthog_dashboardtile"."color", - "posthog_dashboardtile"."filters_hash", - "posthog_dashboardtile"."last_refresh", - "posthog_dashboardtile"."refreshing", - "posthog_dashboardtile"."refresh_attempt", - "posthog_dashboardtile"."deleted" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - 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.224 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6245,7 +6047,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.225 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6256,7 +6058,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.226 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6267,7 +6069,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.227 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6278,7 +6080,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.228 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6289,7 +6091,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.229 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6300,7 +6102,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 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.23 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -6451,24 +6253,93 @@ "posthog_text"."team_id" FROM "posthog_dashboardtile" INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id") - LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id") - LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id") - LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id") - LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id") + LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id") + LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id") + LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id") + LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."dashboard_id" = 2 + AND NOT ("posthog_dashboard"."deleted" + AND "posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND (NOT "posthog_dashboarditem"."deleted" + OR "posthog_dashboardtile"."insight_id" IS NULL)) + ORDER BY "posthog_dashboarditem"."order" ASC /*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.230 + ''' + SELECT "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + 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 + ''' + 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" + INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") + WHERE (NOT ("posthog_dashboard"."deleted") + 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 + ''' + SELECT "posthog_dashboardtile"."id", + "posthog_dashboardtile"."dashboard_id", + "posthog_dashboardtile"."insight_id", + "posthog_dashboardtile"."text_id", + "posthog_dashboardtile"."layouts", + "posthog_dashboardtile"."color", + "posthog_dashboardtile"."filters_hash", + "posthog_dashboardtile"."last_refresh", + "posthog_dashboardtile"."refreshing", + "posthog_dashboardtile"."refresh_attempt", + "posthog_dashboardtile"."deleted" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") WHERE (NOT ("posthog_dashboardtile"."deleted" AND "posthog_dashboardtile"."deleted" IS NOT NULL) AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."dashboard_id" = 2 - AND NOT ("posthog_dashboard"."deleted" - AND "posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND (NOT "posthog_dashboarditem"."deleted" - OR "posthog_dashboardtile"."insight_id" IS NULL)) - ORDER BY "posthog_dashboarditem"."order" ASC /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + 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.240 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.233 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6479,7 +6350,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.234 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6490,7 +6361,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.235 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6501,7 +6372,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.236 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6512,7 +6383,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.237 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6523,7 +6394,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.238 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -6534,7 +6405,81 @@ 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.239 + ''' + 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.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", + "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.241 + ''' + 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.242 + ''' + 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.243 + ''' + 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.244 + ''' + 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.245 ''' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -6545,7 +6490,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", @@ -6572,7 +6517,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" @@ -6580,7 +6525,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 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.248 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -6611,15 +6556,7 @@ LIMIT 21 /**/ ''' # --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25 - ''' - 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.250 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.249 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -6671,7 +6608,38 @@ 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"."strapi_id", + "posthog_user"."email_opt_in", + "posthog_user"."theme_mode", + "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", @@ -6701,7 +6669,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", @@ -6725,7 +6693,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", @@ -6847,7 +6815,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", @@ -6869,7 +6837,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", @@ -6887,7 +6855,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", @@ -7060,7 +7028,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", @@ -7081,7 +7049,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", @@ -7188,7 +7156,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", @@ -7213,38 +7181,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.26 - ''' - 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"."strapi_id", - "posthog_user"."email_opt_in", - "posthog_user"."theme_mode", - "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.260 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.259 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -7270,7 +7207,59 @@ 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 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.26 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + 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.260 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -7441,7 +7430,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", @@ -7462,7 +7451,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", @@ -7569,7 +7558,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", @@ -7594,7 +7583,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", @@ -7620,7 +7609,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", @@ -7642,147 +7631,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 - ''' - 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.268 - ''' - 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.269 - ''' - 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.27 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_id", - "posthog_team"."api_token", - "posthog_team"."app_urls", - "posthog_team"."name", - "posthog_team"."slack_incoming_webhook", - "posthog_team"."created_at", - "posthog_team"."updated_at", - "posthog_team"."anonymize_ips", - "posthog_team"."completed_snippet_onboarding", - "posthog_team"."has_completed_onboarding_for", - "posthog_team"."ingested_event", - "posthog_team"."autocapture_opt_out", - "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"."session_recording_minimum_duration_milliseconds", - "posthog_team"."session_recording_linked_flag", - "posthog_team"."session_recording_network_payload_capture_config", - "posthog_team"."session_replay_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."surveys_opt_in", - "posthog_team"."session_recording_version", - "posthog_team"."signup_token", - "posthog_team"."is_demo", - "posthog_team"."access_control", - "posthog_team"."week_start_day", - "posthog_team"."inject_web_apps", - "posthog_team"."test_account_filters", - "posthog_team"."test_account_filters_default_checked", - "posthog_team"."path_cleaning_filters", - "posthog_team"."timezone", - "posthog_team"."data_attributes", - "posthog_team"."person_display_name_properties", - "posthog_team"."live_events_columns", - "posthog_team"."recording_domains", - "posthog_team"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 2 - 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.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", - "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.272 - ''' - 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.273 - ''' - 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.274 - ''' - 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.275 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.266 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7793,7 +7642,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.267 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7804,7 +7653,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.268 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7815,7 +7664,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.269 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7826,34 +7675,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 - ''' - 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 (NOT ("posthog_dashboard"."deleted") - AND "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.28 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.27 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -7883,7 +7705,7 @@ WHERE "posthog_organizationmembership"."user_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.280 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.270 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7894,7 +7716,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.281 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.271 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7905,7 +7727,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.282 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.272 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7916,7 +7738,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.283 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.273 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7927,7 +7749,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.284 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.274 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7938,7 +7760,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.285 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.275 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7949,7 +7771,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.286 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.276 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7960,7 +7782,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.287 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.277 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -7971,29 +7793,45 @@ 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.288 +# 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_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'*/ + 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 (NOT ("posthog_dashboard"."deleted") + AND "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.289 +# 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_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.29 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.28 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -8014,21 +7852,10 @@ FROM "posthog_dashboard" WHERE (NOT ("posthog_dashboard"."deleted") AND "posthog_dashboard"."id" = 2) - 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.290 - ''' - 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'*/ + 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.291 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.280 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8039,7 +7866,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.292 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.281 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8050,7 +7877,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.293 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.282 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8061,7 +7888,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.294 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.283 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8072,7 +7899,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.295 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.284 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8083,7 +7910,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.296 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.285 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8094,7 +7921,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.297 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.286 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8105,7 +7932,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.298 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.287 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8116,7 +7943,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.299 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.288 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8127,18 +7954,18 @@ 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.3 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.289 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", "posthog_instancesetting"."raw_value" FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' + WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED' ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ + 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.30 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.29 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -8162,7 +7989,18 @@ 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.300 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.290 + ''' + 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.291 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8173,7 +8011,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.301 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.292 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8184,7 +8022,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.302 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.293 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8195,7 +8033,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.303 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.294 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8206,7 +8044,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.304 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.295 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8217,7 +8055,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.305 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.296 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8228,7 +8066,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.306 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.297 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8239,7 +8077,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.307 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.298 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8250,7 +8088,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.308 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.299 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8261,18 +8099,18 @@ 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.309 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.3 ''' 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:RATE_LIMIT_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'*/ + LIMIT 1 /*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.31 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.30 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8324,7 +8162,18 @@ 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.310 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.300 + ''' + 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.301 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8335,7 +8184,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.311 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.302 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8346,7 +8195,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.312 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.303 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8357,7 +8206,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.313 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.304 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8368,7 +8217,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.314 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.305 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8379,7 +8228,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.315 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.306 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8390,7 +8239,40 @@ 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.32 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.307 + ''' + 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.308 + ''' + 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.309 + ''' + 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.31 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -8425,7 +8307,73 @@ 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.33 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.310 + ''' + 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.311 + ''' + 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.312 + ''' + 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.313 + ''' + 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.314 + ''' + 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.315 + ''' + 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.32 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8484,7 +8432,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.34 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.33 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8495,7 +8443,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.35 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.34 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8506,7 +8454,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.36 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.35 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8517,7 +8465,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.37 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.36 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8528,7 +8476,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.38 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.37 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8539,7 +8487,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.39 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.38 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8550,18 +8498,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.4 - ''' - SELECT "posthog_dashboardtile"."id" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."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.40 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.39 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -8588,7 +8525,18 @@ 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.41 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.4 + ''' + SELECT "posthog_dashboardtile"."id" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."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.40 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8647,7 +8595,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.42 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.41 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8706,7 +8654,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.43 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.42 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8717,7 +8665,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.44 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.43 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8728,7 +8676,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.45 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.44 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8739,7 +8687,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.46 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.45 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8750,7 +8698,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.47 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.46 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8761,7 +8709,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.48 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.47 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8772,7 +8720,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.49 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.48 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8824,6 +8772,24 @@ 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.49 + ''' + SELECT "posthog_dashboardtile"."id", + "posthog_dashboardtile"."dashboard_id", + "posthog_dashboardtile"."insight_id", + "posthog_dashboardtile"."text_id", + "posthog_dashboardtile"."layouts", + "posthog_dashboardtile"."color", + "posthog_dashboardtile"."filters_hash", + "posthog_dashboardtile"."last_refresh", + "posthog_dashboardtile"."refreshing", + "posthog_dashboardtile"."refresh_attempt", + "posthog_dashboardtile"."deleted" + FROM "posthog_dashboardtile" + WHERE "posthog_dashboardtile"."id" = 2 + 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.5 ''' SELECT "posthog_organization"."id", @@ -8849,24 +8815,6 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.50 - ''' - SELECT "posthog_dashboardtile"."id", - "posthog_dashboardtile"."dashboard_id", - "posthog_dashboardtile"."insight_id", - "posthog_dashboardtile"."text_id", - "posthog_dashboardtile"."layouts", - "posthog_dashboardtile"."color", - "posthog_dashboardtile"."filters_hash", - "posthog_dashboardtile"."last_refresh", - "posthog_dashboardtile"."refreshing", - "posthog_dashboardtile"."refresh_attempt", - "posthog_dashboardtile"."deleted" - FROM "posthog_dashboardtile" - WHERE "posthog_dashboardtile"."id" = 2 - 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.51 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -8901,7 +8849,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.52 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.51 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -8924,7 +8872,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.53 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.52 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8983,7 +8931,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.54 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.53 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -8994,7 +8942,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.55 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.54 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9005,7 +8953,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.56 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.55 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9016,7 +8964,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.57 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.56 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9027,7 +8975,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.58 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.57 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9038,7 +8986,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.59 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.58 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9049,19 +8997,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.6 - ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_dashboardtile" - INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") - WHERE (NOT ("posthog_dashboardtile"."deleted" - AND "posthog_dashboardtile"."deleted" IS NOT NULL) - AND NOT ("posthog_dashboard"."deleted") - AND "posthog_dashboardtile"."dashboard_id" = 2 - AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*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.60 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.59 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9120,7 +9056,19 @@ 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.61 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.6 + ''' + SELECT COUNT(*) AS "__count" + FROM "posthog_dashboardtile" + INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id") + WHERE (NOT ("posthog_dashboardtile"."deleted" + AND "posthog_dashboardtile"."deleted" IS NOT NULL) + AND NOT ("posthog_dashboard"."deleted") + AND "posthog_dashboardtile"."dashboard_id" = 2 + AND NOT ("posthog_dashboardtile"."insight_id" IS NULL)) /*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.60 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9131,7 +9079,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.62 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.61 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9142,7 +9090,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.63 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.62 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9153,7 +9101,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.64 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.63 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9164,7 +9112,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.65 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.64 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9175,7 +9123,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.66 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.65 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9186,7 +9134,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.67 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.66 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9238,7 +9186,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.68 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.67 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -9256,7 +9204,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.69 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.68 ''' SELECT "posthog_dashboarditem"."id", "posthog_dashboarditem"."name", @@ -9291,21 +9239,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.7 - ''' - 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.70 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.69 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9328,7 +9262,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.71 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.7 + ''' + 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.70 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9387,7 +9335,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.72 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.71 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9398,7 +9346,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.73 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.72 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9409,7 +9357,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.74 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.73 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9420,7 +9368,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.75 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.74 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9431,7 +9379,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.76 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.75 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9442,7 +9390,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.77 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.76 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9453,7 +9401,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.78 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.77 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -9477,7 +9425,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.79 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.78 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9501,14 +9449,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.8 - ''' - SELECT COUNT(*) AS "__count" - FROM "posthog_taggeditem" - 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.80 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.79 ''' SELECT "posthog_dashboardtile"."id", "posthog_dashboardtile"."dashboard_id", @@ -9529,7 +9470,14 @@ 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.81 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.8 + ''' + SELECT COUNT(*) AS "__count" + FROM "posthog_taggeditem" + 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.80 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9540,7 +9488,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.82 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.81 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9551,7 +9499,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.83 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.82 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9562,7 +9510,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.84 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.83 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9573,7 +9521,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.85 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.84 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9584,7 +9532,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.86 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.85 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9595,7 +9543,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.87 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.86 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9606,7 +9554,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.88 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.87 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9617,7 +9565,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.89 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.88 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9628,6 +9576,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.89 + ''' + 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.9 ''' SELECT "posthog_team"."id", @@ -9688,17 +9647,6 @@ ''' # --- # name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.90 - ''' - 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.91 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9709,7 +9657,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.92 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.91 ''' SELECT "posthog_instancesetting"."id", "posthog_instancesetting"."key", @@ -9720,7 +9668,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.93 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.92 ''' SELECT "posthog_dashboardtile"."dashboard_id" FROM "posthog_dashboardtile" @@ -9731,7 +9679,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.94 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.93 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9758,7 +9706,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.95 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.94 ''' SELECT "posthog_tag"."name" FROM "posthog_taggeditem" @@ -9766,7 +9714,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.96 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.95 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -9797,7 +9745,7 @@ LIMIT 21 /**/ ''' # --- -# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.97 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.96 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -9849,7 +9797,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.98 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.97 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -9879,7 +9827,7 @@ WHERE "posthog_organizationmembership"."user_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.99 +# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98 ''' SELECT "posthog_dashboard"."id", "posthog_dashboard"."name", @@ -9903,6 +9851,58 @@ 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.99 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."api_token", + "posthog_team"."app_urls", + "posthog_team"."name", + "posthog_team"."slack_incoming_webhook", + "posthog_team"."created_at", + "posthog_team"."updated_at", + "posthog_team"."anonymize_ips", + "posthog_team"."completed_snippet_onboarding", + "posthog_team"."has_completed_onboarding_for", + "posthog_team"."ingested_event", + "posthog_team"."autocapture_opt_out", + "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"."session_recording_minimum_duration_milliseconds", + "posthog_team"."session_recording_linked_flag", + "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", + "posthog_team"."session_recording_version", + "posthog_team"."signup_token", + "posthog_team"."is_demo", + "posthog_team"."access_control", + "posthog_team"."week_start_day", + "posthog_team"."inject_web_apps", + "posthog_team"."test_account_filters", + "posthog_team"."test_account_filters_default_checked", + "posthog_team"."path_cleaning_filters", + "posthog_team"."timezone", + "posthog_team"."data_attributes", + "posthog_team"."person_display_name_properties", + "posthog_team"."live_events_columns", + "posthog_team"."recording_domains", + "posthog_team"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 2 + 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_retrieve_dashboard ''' SELECT "posthog_dashboardtile"."id" From 76a5e600185b9b8d508afecae140b1bb3c8ddd0f Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Tue, 6 Feb 2024 15:58:48 -0800 Subject: [PATCH 06/11] address pr feedback --- ee/billing/quota_limiting.py | 68 +++++----- ee/billing/test/test_quota_limiting.py | 169 ++++++++++++++++++------- 2 files changed, 160 insertions(+), 77 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index cf06d532d1ccb..5f636e89283c4 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -22,10 +22,11 @@ from posthog.utils import get_current_day QUOTA_LIMITER_CACHE_KEY = "@posthog/quota-limits/" -# We are updating the quota limiting behavior so we retain data for 7 days before +# We are updating the quota limiting behavior so we retain data for DAYS_RETAIN_DATA days before # permanently dropping it. This will allow us to recover data in the case of incidents # where usage may have inadvertently exceeded a billing limit. # Ref: INC-144 +DAYS_RETAIN_DATA = 3 QUOTA_OVERAGE_RETENTION_CACHE_KEY = "@posthog/quota-overage-retention/" @@ -42,9 +43,7 @@ class QuotaResource(Enum): } -def replace_limited_team_tokens( - resource: QuotaResource, tokens: Mapping[str, int], cache_key: str = QUOTA_LIMITER_CACHE_KEY -) -> None: +def replace_limited_team_tokens(resource: QuotaResource, tokens: Mapping[str, int], cache_key) -> None: pipe = get_client().pipeline() pipe.delete(f"{cache_key}{resource.value}") if tokens: @@ -52,9 +51,7 @@ def replace_limited_team_tokens( pipe.execute() -def add_limited_team_tokens( - resource: QuotaResource, tokens: Mapping[str, int], cache_key: str = QUOTA_LIMITER_CACHE_KEY -) -> None: +def add_limited_team_tokens(resource: QuotaResource, tokens: Mapping[str, int], cache_key) -> None: redis_client = get_client() redis_client.zadd(f"{cache_key}{resource.value}", tokens) # type: ignore # (zadd takes a Mapping[str, int] but the derived Union type is wrong) @@ -80,9 +77,16 @@ class UsageCounters(TypedDict): rows_synced: int -def org_quota_limited_until( - organization: Organization, resource: QuotaResource, today: datetime -) -> Optional[Tuple[Optional[int], Optional[int], Optional[bool]]]: +class QuotaLimitingTracker(TypedDict): + data_retained_until: Optional[int] # timestamp + quota_limited_until: Optional[int] # timestamp + needs_save: Optional[bool] + + +def determine_org_quota_limit_or_data_retention( + organization: Organization, resource: QuotaResource +) -> Optional[QuotaLimitingTracker]: + today, _ = get_current_day() if not organization.usage: return None @@ -108,7 +112,7 @@ def org_quota_limited_until( data_retained_until = None del summary["retained_period_end"] needs_save = True - return None, None, True + return {"quota_limited_until": None, "data_retained_until": None, "needs_save": needs_save} return None if organization.never_drop_data: @@ -117,14 +121,19 @@ def org_quota_limited_until( # Either wasn't set or was set in the previous biling period if ( not data_retained_until - or round((datetime.fromtimestamp(data_retained_until) - timedelta(days=7)).timestamp()) < billing_period_start + or round((datetime.fromtimestamp(data_retained_until) - timedelta(days=DAYS_RETAIN_DATA)).timestamp()) + < billing_period_start ): - data_retained_until = round((today + timedelta(days=7)).timestamp()) + data_retained_until = round((today + timedelta(days=DAYS_RETAIN_DATA)).timestamp()) summary["retained_period_end"] = data_retained_until needs_save = True if billing_period_end: - return billing_period_end, data_retained_until, needs_save + return { + "quota_limited_until": billing_period_end, + "data_retained_until": data_retained_until, + "needs_save": needs_save, + } return None @@ -136,9 +145,11 @@ def sync_org_quota_limits(organization: Organization): today_start, _ = get_current_day() for resource in [QuotaResource.EVENTS, QuotaResource.RECORDINGS, QuotaResource.ROWS_SYNCED]: team_attributes = get_team_attribute_by_quota_resource(organization, resource) - result = org_quota_limited_until(organization, resource, today_start) + result = determine_org_quota_limit_or_data_retention(organization, resource) if result: - quota_limited_until, data_retained_until, needs_save = result + quota_limited_until = result.get("quota_limited_until") + data_retained_until = result.get("data_retained_until") + needs_save = result.get("needs_save") if needs_save: organization.save() @@ -269,9 +280,11 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict org.save(update_fields=["usage"]) for field in ["events", "recordings", "rows_synced"]: - result = org_quota_limited_until(org, QuotaResource(field), period_start) + result = determine_org_quota_limit_or_data_retention(org, QuotaResource(field)) if result: - quota_limited_until, data_retained_until, needs_save = result + quota_limited_until = result.get("quota_limited_until") + data_retained_until = result.get("data_retained_until") + needs_save = result.get("needs_save") if needs_save: org.save(update_fields=["usage"]) @@ -283,17 +296,8 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict # Get the current quota limits so we can track to posthog if it changes orgs_with_changes = set() - previously_quota_limited_team_tokens: Dict[str, Dict[str, int]] = { - "events": {}, - "recordings": {}, - "rows_synced": {}, - } - - previously_data_retained_teams: Dict[str, Dict[str, int]] = { - "events": {}, - "recordings": {}, - "rows_synced": {}, - } + previously_quota_limited_team_tokens: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} + previously_data_retained_teams: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} for field in quota_limited_orgs: previously_quota_limited_team_tokens[field] = list_limited_team_attributes(QuotaResource(field)) @@ -301,8 +305,8 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict QuotaResource(field), QUOTA_OVERAGE_RETENTION_CACHE_KEY ) - quota_limited_teams: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} - data_retained_teams: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} + quota_limited_teams: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} + data_retained_teams: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} # Convert the org ids to team tokens for team in teams: @@ -344,6 +348,6 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict QuotaResource(field), data_retained_teams[field], QUOTA_OVERAGE_RETENTION_CACHE_KEY ) for field in quota_limited_teams: - replace_limited_team_tokens(QuotaResource(field), quota_limited_teams[field]) + replace_limited_team_tokens(QuotaResource(field), quota_limited_teams[field], QUOTA_LIMITER_CACHE_KEY) return quota_limited_orgs, data_retained_orgs diff --git a/ee/billing/test/test_quota_limiting.py b/ee/billing/test/test_quota_limiting.py index 44abc6741f103..647883d72b37a 100644 --- a/ee/billing/test/test_quota_limiting.py +++ b/ee/billing/test/test_quota_limiting.py @@ -10,8 +10,8 @@ QUOTA_LIMITER_CACHE_KEY, QUOTA_OVERAGE_RETENTION_CACHE_KEY, QuotaResource, + determine_org_quota_limit_or_data_retention, list_limited_team_attributes, - org_quota_limited_until, replace_limited_team_tokens, set_org_usage_summary, sync_org_quota_limits, @@ -32,6 +32,83 @@ def setUp(self) -> None: self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYrecordings") self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYrows_synced") + @patch("posthoganalytics.capture") + @patch("posthoganalytics.feature_enabled", return_value=True) + def test_dont_quota_limit_feature_flag_enabled(self, patch_feature_enabled, patch_capture) -> None: + with self.settings(USE_TZ=False): + self.organization.usage = { + "events": {"usage": 99, "limit": 100}, + "recordings": {"usage": 1, "limit": 100}, + "rows_synced": {"usage": 5, "limit": 100}, + "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], + } + self.organization.save() + + distinct_id = str(uuid4()) + + # add a bunch of events so that the organization is over the limit + # Because the feature flag is enabled + for _ in range(0, 10): + _create_event( + distinct_id=distinct_id, + event="$event1", + properties={"$lib": "$web"}, + timestamp=now() - relativedelta(hours=1), + team=self.team, + ) + time.sleep(1) + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() + patch_feature_enabled.assert_called_with( + QUOTA_LIMIT_DATA_RETENTION_FLAG, + self.organization.id, + groups={"organization": str(self.organization.id)}, + group_properties={"organization": {"id": str(self.organization.id)}}, + ) + patch_capture.assert_called_once_with( + str(self.organization.id), + "quota limiting suspended", + properties={"current_usage": 109}, + groups={"instance": "http://localhost:8000", "organization": str(self.organization.id)}, + ) + assert data_retained_orgs["events"] == {} + assert data_retained_orgs["recordings"] == {} + assert data_retained_orgs["rows_synced"] == {} + assert quota_limited_orgs["events"] == {} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} + + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + + @patch("posthoganalytics.capture") + @patch("posthoganalytics.feature_enabled", return_value=True) + def test_quota_limit_feature_flag_not_on(self, patch_feature_enabled, patch_capture) -> None: + # Confirm that we don't send an event if they weren't going to be limited. + self.organization.usage = { + "events": {"usage": 99, "limit": 100}, + "recordings": {"usage": 1, "limit": 100}, + "rows_synced": {"usage": 5, "limit": 100}, + "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], + } + self.organization.save() + + time.sleep(1) + quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() + # Shouldn't be called due to lazy evaluation of the conditional + patch_feature_enabled.assert_not_called() + patch_capture.assert_not_called() + assert data_retained_orgs["events"] == {} + assert data_retained_orgs["recordings"] == {} + assert data_retained_orgs["rows_synced"] == {} + assert quota_limited_orgs["events"] == {} + assert quota_limited_orgs["recordings"] == {} + assert quota_limited_orgs["rows_synced"] == {} + + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + def test_billing_rate_limit_not_set_if_missing_org_usage(self) -> None: with self.settings(USE_TZ=False): self.organization.usage = {} @@ -88,9 +165,9 @@ def test_billing_rate_limit(self) -> None: org_id = str(self.organization.id) with freeze_time("2021-01-25T22:09:14.252Z"): - # Should be data_retained until Feb 1 2021 + # Should be data_retained until Jan 28 2021 quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() - assert data_retained_orgs["events"] == {org_id: 1612137600} + assert data_retained_orgs["events"] == {org_id: 1611792000} assert quota_limited_orgs["events"] == {} assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} @@ -101,23 +178,23 @@ def test_billing_rate_limit(self) -> None: self.organization.refresh_from_db() assert self.organization.usage == { - "events": {"usage": 99, "limit": 100, "todays_usage": 10, "retained_period_end": 1612137600}, + "events": {"usage": 99, "limit": 100, "todays_usage": 10, "retained_period_end": 1611792000}, "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } - with freeze_time("2021-01-28T22:09:14.252Z"): + with freeze_time("2021-01-27T22:09:14.252Z"): self.organization.usage = { - "events": {"usage": 109, "limit": 100, "retained_period_end": 1612137600}, + "events": {"usage": 109, "limit": 100, "retained_period_end": 1611792000}, "recordings": {"usage": 1, "limit": 100}, "rows_synced": {"usage": 5, "limit": 100}, "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } self.organization.save() - # Fast forward three days and should still be data retained until Feb 1 2021 + # Fast forward two days and should still be data retained until Jan 28 2021 quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() - assert data_retained_orgs["events"] == {org_id: 1612137600} + assert data_retained_orgs["events"] == {org_id: 1611792000} assert quota_limited_orgs["events"] == {} assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} @@ -128,7 +205,7 @@ def test_billing_rate_limit(self) -> None: self.organization.refresh_from_db() assert self.organization.usage == { - "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1612137600}, + "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1611792000}, "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], @@ -136,7 +213,7 @@ def test_billing_rate_limit(self) -> None: with freeze_time("2021-02-2T22:09:14.252Z"): self.organization.usage = { - "events": {"usage": 109, "limit": 100, "retained_period_end": 1612137600}, + "events": {"usage": 109, "limit": 100, "retained_period_end": 1611792000}, "recordings": {"usage": 1, "limit": 100}, "rows_synced": {"usage": 5, "limit": 100}, "period": ["2021-01-05T00:00:00Z", "2021-02-05T23:59:59Z"], @@ -157,7 +234,7 @@ def test_billing_rate_limit(self) -> None: self.organization.refresh_from_db() assert self.organization.usage == { - "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1612137600}, + "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1611792000}, "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, "period": ["2021-01-05T00:00:00Z", "2021-02-05T23:59:59Z"], @@ -171,9 +248,9 @@ def test_billing_rate_limit(self) -> None: "period": ["2021-02-01T00:00:00Z", "2021-02-28T23:59:59Z"], } self.organization.save() - # Fast forward eight days and should still be data retained but with updated retention end because of new biling period + # Fast forward two days and should still be data retained but with updated retention end because of new biling period quota_limited_orgs, data_retained_orgs = update_all_org_billing_quotas() - assert data_retained_orgs["events"] == {org_id: 1612828800} + assert data_retained_orgs["events"] == {org_id: 1612483200} assert quota_limited_orgs["events"] == {} assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} @@ -184,7 +261,7 @@ def test_billing_rate_limit(self) -> None: self.organization.refresh_from_db() assert self.organization.usage == { - "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1612828800}, + "events": {"usage": 109, "limit": 100, "todays_usage": 0, "retained_period_end": 1612483200}, "recordings": {"usage": 1, "limit": 100, "todays_usage": 0}, "rows_synced": {"usage": 5, "limit": 100, "todays_usage": 0}, "period": ["2021-02-01T00:00:00Z", "2021-02-28T23:59:59Z"], @@ -269,8 +346,7 @@ def test_set_org_usage_summary_updates_todays_usage(self): @freeze_time("2021-01-25T22:09:14.252Z") def test_org_quota_limited_until(self): self.organization.usage = None - today = timezone.now() - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.EVENTS) is None self.organization.usage = { "events": {"usage": 99, "limit": 100}, @@ -279,46 +355,49 @@ def test_org_quota_limited_until(self): "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.EVENTS) is None self.organization.usage["events"]["usage"] = 120 - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) == (1612137599, 1612217354, True) + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.EVENTS) == { + "data_retained_until": 1611792000, + "needs_save": True, + "quota_limited_until": 1612137599, + } self.organization.usage["events"]["usage"] = 90 self.organization.usage["events"]["todays_usage"] = 10 - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) == ( - 1612137599, - 1612217354, - False, - ) + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.EVENTS) == { + "data_retained_until": 1611792000, + "needs_save": False, + "quota_limited_until": 1612137599, + } self.organization.usage["events"]["limit"] = None - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.EVENTS) is None self.organization.usage["recordings"]["usage"] = 1099 # Under limit + buffer - assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS, today) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.RECORDINGS) is None self.organization.usage["recordings"]["usage"] = 1100 # Over limit + buffer - assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS, today) == ( - 1612137599, - 1612217354, - True, - ) + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.RECORDINGS) == { + "data_retained_until": 1611792000, + "needs_save": True, + "quota_limited_until": 1612137599, + } - assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED, today) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.ROWS_SYNCED) is None self.organization.usage["rows_synced"]["usage"] = 101 - assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED, today) == ( - 1612137599, - 1612217354, - True, - ) + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.ROWS_SYNCED) == { + "data_retained_until": 1611792000, + "needs_save": True, + "quota_limited_until": 1612137599, + } @freeze_time("2021-01-25T22:09:14.252Z") def test_over_quota_but_not_dropped_org(self): self.organization.usage = None - today = timezone.now().timestamp() - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.EVENTS) is None self.organization.usage = { "events": {"usage": 100, "limit": 90}, @@ -328,9 +407,9 @@ def test_over_quota_but_not_dropped_org(self): } self.organization.never_drop_data = True - assert org_quota_limited_until(self.organization, QuotaResource.EVENTS, today) is None - assert org_quota_limited_until(self.organization, QuotaResource.RECORDINGS, today) is None - assert org_quota_limited_until(self.organization, QuotaResource.ROWS_SYNCED, today) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.EVENTS) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.RECORDINGS) is None + assert determine_org_quota_limit_or_data_retention(self.organization, QuotaResource.ROWS_SYNCED) is None # reset for subsequent tests self.organization.never_drop_data = False @@ -341,8 +420,8 @@ def test_sync_org_quota_limits(self): now = timezone.now().timestamp() - replace_limited_team_tokens(QuotaResource.EVENTS, {"1234": now + 10000}) - replace_limited_team_tokens(QuotaResource.ROWS_SYNCED, {"1337": now + 10000}) + replace_limited_team_tokens(QuotaResource.EVENTS, {"1234": now + 10000}, QUOTA_LIMITER_CACHE_KEY) + replace_limited_team_tokens(QuotaResource.ROWS_SYNCED, {"1337": now + 10000}, QUOTA_LIMITER_CACHE_KEY) self.organization.usage = { "events": {"usage": 99, "limit": 100}, "recordings": {"usage": 1, "limit": 100}, @@ -359,9 +438,9 @@ def test_sync_org_quota_limits(self): sync_org_quota_limits(self.organization) # Org will be data retained. assert self.organization.usage == { - "events": {"usage": 120, "limit": 100, "retained_period_end": 1610064000}, + "events": {"usage": 120, "limit": 100, "retained_period_end": 1609718400}, "recordings": {"usage": 1, "limit": 100}, - "rows_synced": {"limit": 100, "retained_period_end": 1610064000, "usage": 120}, + "rows_synced": {"limit": 100, "retained_period_end": 1609718400, "usage": 120}, "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } assert sorted( From 4d6aba56c930784a248ebeace032a7a134161b5e Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Tue, 6 Feb 2024 16:41:19 -0800 Subject: [PATCH 07/11] small updates --- ee/billing/quota_limiting.py | 4 ++-- ee/billing/test/test_quota_limiting.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index 8fdf8766d7746..3cd13fa0eb60b 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -289,8 +289,8 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict for field in team_report: org_report[field] += team_report[field] # type: ignore - quota_limited_orgs: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} - data_retained_orgs: Dict[str, Dict[str, int]] = {"events": {}, "recordings": {}, "rows_synced": {}} + quota_limited_orgs: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} + data_retained_orgs: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} # We find all orgs that should be rate limited for org_id, todays_report in todays_usage_report.items(): diff --git a/ee/billing/test/test_quota_limiting.py b/ee/billing/test/test_quota_limiting.py index 4a07e044df5f1..18a660316c42b 100644 --- a/ee/billing/test/test_quota_limiting.py +++ b/ee/billing/test/test_quota_limiting.py @@ -49,7 +49,6 @@ def test_dont_quota_limit_feature_flag_enabled(self, patch_feature_enabled, patc distinct_id = str(uuid4()) # add a bunch of events so that the organization is over the limit - # Because the feature flag is enabled for _ in range(0, 10): _create_event( distinct_id=distinct_id, @@ -72,6 +71,7 @@ def test_dont_quota_limit_feature_flag_enabled(self, patch_feature_enabled, patc properties={"current_usage": 109}, groups={"instance": "http://localhost:8000", "organization": str(self.organization.id)}, ) + # Not limited because the feature flag is enabled. assert data_retained_orgs["events"] == {} assert data_retained_orgs["recordings"] == {} assert data_retained_orgs["rows_synced"] == {} @@ -141,8 +141,7 @@ def test_billing_rate_limit_not_set_if_missing_org_usage(self) -> None: assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] - @patch("posthoganalytics.capture") - def test_billing_rate_limit(self, patch_capture) -> None: + def test_billing_rate_limit(self) -> None: with self.settings(USE_TZ=False), freeze_time("2021-01-25T22:09:14.252Z"): self.organization.usage = { "events": {"usage": 99, "limit": 100}, From 95ba52aa938e7805c66b42342afd04b36dde0ca5 Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Wed, 7 Feb 2024 11:12:53 -0800 Subject: [PATCH 08/11] fix tests --- ee/billing/quota_limiting.py | 4 +++- posthog/api/test/test_capture.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index 3cd13fa0eb60b..5fe5784e8f119 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -170,7 +170,9 @@ def sync_org_quota_limits(organization: Organization): if needs_save: organization.save() if quota_limited_until and (data_retained_until and data_retained_until < round(today_start.timestamp())): - add_limited_team_tokens(resource, {x: quota_limited_until for x in team_attributes}) + add_limited_team_tokens( + resource, {x: quota_limited_until for x in team_attributes}, QUOTA_LIMITER_CACHE_KEY + ) continue elif data_retained_until and data_retained_until >= today_start.timestamp(): add_limited_team_tokens( diff --git a/posthog/api/test/test_capture.py b/posthog/api/test/test_capture.py index 73654abf7a269..a4d4e31bec34c 100644 --- a/posthog/api/test/test_capture.py +++ b/posthog/api/test/test_capture.py @@ -12,11 +12,12 @@ from unittest import mock from unittest.mock import ANY, MagicMock, call, patch from urllib.parse import quote + import lzstring import pytest import structlog from django.http import HttpResponse -from django.test.client import Client, MULTIPART_CONTENT +from django.test.client import MULTIPART_CONTENT, Client from django.utils import timezone from freezegun import freeze_time from kafka.errors import KafkaError @@ -27,6 +28,7 @@ from rest_framework import status from token_bucket import Limiter, MemoryStorage +from ee.billing.quota_limiting import QUOTA_LIMITER_CACHE_KEY from posthog.api import capture from posthog.api.capture import ( LIKELY_ANONYMOUS_IDS, @@ -1719,12 +1721,10 @@ def test_quota_limits_ignored_if_disabled(self, kafka_produce) -> None: from ee.billing.quota_limiting import QuotaResource, replace_limited_team_tokens replace_limited_team_tokens( - QuotaResource.RECORDINGS, - {self.team.api_token: timezone.now().timestamp() + 10000}, + QuotaResource.RECORDINGS, {self.team.api_token: timezone.now().timestamp() + 10000}, QUOTA_LIMITER_CACHE_KEY ) replace_limited_team_tokens( - QuotaResource.EVENTS, - {self.team.api_token: timezone.now().timestamp() + 10000}, + QuotaResource.EVENTS, {self.team.api_token: timezone.now().timestamp() + 10000}, QUOTA_LIMITER_CACHE_KEY ) self._send_august_2023_version_session_recording_event() self.assertEqual(kafka_produce.call_count, 1) @@ -1774,8 +1774,7 @@ def _produce_events(): ) replace_limited_team_tokens( - QuotaResource.EVENTS, - {self.team.api_token: timezone.now().timestamp() + 10000}, + QuotaResource.EVENTS, {self.team.api_token: timezone.now().timestamp() + 10000}, QUOTA_LIMITER_CACHE_KEY ) _produce_events() self.assertEqual(kafka_produce.call_count, 1) # Only the recording event @@ -1783,6 +1782,7 @@ def _produce_events(): replace_limited_team_tokens( QuotaResource.RECORDINGS, {self.team.api_token: timezone.now().timestamp() + 10000}, + QUOTA_LIMITER_CACHE_KEY, ) _produce_events() self.assertEqual(kafka_produce.call_count, 0) # No events @@ -1790,10 +1790,10 @@ def _produce_events(): replace_limited_team_tokens( QuotaResource.RECORDINGS, {self.team.api_token: timezone.now().timestamp() - 10000}, + QUOTA_LIMITER_CACHE_KEY, ) replace_limited_team_tokens( - QuotaResource.EVENTS, - {self.team.api_token: timezone.now().timestamp() - 10000}, + QuotaResource.EVENTS, {self.team.api_token: timezone.now().timestamp() - 10000}, QUOTA_LIMITER_CACHE_KEY ) _produce_events() self.assertEqual(kafka_produce.call_count, 3) # All events as limit-until timestamp is in the past From 431651b0b19d6d8a76f6eb490f0e8724042e3ed9 Mon Sep 17 00:00:00 2001 From: Raquel Smith Date: Thu, 8 Feb 2024 10:55:28 -0800 Subject: [PATCH 09/11] use better types and no key defaults --- ee/billing/quota_limiting.py | 39 +++++++++++++++++++++----- ee/billing/test/test_quota_limiting.py | 20 +++++++++---- posthog/api/capture.py | 12 ++++---- 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index 5fe5784e8f119..0dc785d1eb4dd 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -1,7 +1,17 @@ import copy from datetime import datetime, timedelta from enum import Enum -from typing import Dict, List, Mapping, Optional, Sequence, Tuple, TypedDict, cast +from typing import ( + Dict, + List, + Mapping, + Optional, + Sequence, + Tuple, + TypedDict, + Union, + cast, +) import dateutil.parser import posthoganalytics @@ -46,7 +56,11 @@ class QuotaResource(Enum): } -def replace_limited_team_tokens(resource: QuotaResource, tokens: Mapping[str, int], cache_key) -> None: +def replace_limited_team_tokens( + resource: QuotaResource, + tokens: Mapping[str, int], + cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], +) -> None: pipe = get_client().pipeline() pipe.delete(f"{cache_key}{resource.value}") if tokens: @@ -54,20 +68,29 @@ def replace_limited_team_tokens(resource: QuotaResource, tokens: Mapping[str, in pipe.execute() -def add_limited_team_tokens(resource: QuotaResource, tokens: Mapping[str, int], cache_key) -> None: +def add_limited_team_tokens( + resource: QuotaResource, + tokens: Mapping[str, int], + cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], +) -> None: redis_client = get_client() redis_client.zadd(f"{cache_key}{resource.value}", tokens) # type: ignore # (zadd takes a Mapping[str, int] but the derived Union type is wrong) def remove_limited_team_tokens( - resource: QuotaResource, tokens: List[str], cache_key: str = QUOTA_LIMITER_CACHE_KEY + resource: QuotaResource, + tokens: List[str], + cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], ) -> None: redis_client = get_client() redis_client.zrem(f"{cache_key}{resource.value}", *tokens) @cache_for(timedelta(seconds=30), background_refresh=True) -def list_limited_team_attributes(resource: QuotaResource, cache_key: str = QUOTA_LIMITER_CACHE_KEY) -> List[str]: +def list_limited_team_attributes( + resource: QuotaResource, + cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], +) -> List[str]: now = timezone.now() redis_client = get_client() results = redis_client.zrangebyscore(f"{cache_key}{resource.value}", min=now.timestamp(), max="+inf") @@ -179,7 +202,7 @@ def sync_org_quota_limits(organization: Organization): resource, {x: data_retained_until for x in team_attributes}, QUOTA_OVERAGE_RETENTION_CACHE_KEY ) continue - remove_limited_team_tokens(resource, team_attributes) + remove_limited_team_tokens(resource, team_attributes, QUOTA_LIMITER_CACHE_KEY) remove_limited_team_tokens(resource, team_attributes, QUOTA_OVERAGE_RETENTION_CACHE_KEY) @@ -325,7 +348,9 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict previously_data_retained_teams: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} for field in quota_limited_orgs: - previously_quota_limited_team_tokens[field] = list_limited_team_attributes(QuotaResource(field)) + previously_quota_limited_team_tokens[field] = list_limited_team_attributes( + QuotaResource(field), QUOTA_LIMITER_CACHE_KEY + ) previously_data_retained_teams[field] = list_limited_team_attributes( QuotaResource(field), QUOTA_OVERAGE_RETENTION_CACHE_KEY ) diff --git a/ee/billing/test/test_quota_limiting.py b/ee/billing/test/test_quota_limiting.py index 18a660316c42b..2d49d875f4b90 100644 --- a/ee/billing/test/test_quota_limiting.py +++ b/ee/billing/test/test_quota_limiting.py @@ -432,8 +432,8 @@ def test_sync_org_quota_limits(self): } sync_org_quota_limits(self.organization) - assert list_limited_team_attributes(QuotaResource.EVENTS) == ["1234"] - assert list_limited_team_attributes(QuotaResource.ROWS_SYNCED) == ["1337"] + assert list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY) == ["1234"] + assert list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_LIMITER_CACHE_KEY) == ["1337"] self.organization.usage["events"]["usage"] = 120 self.organization.usage["rows_synced"]["usage"] = 120 @@ -448,13 +448,17 @@ def test_sync_org_quota_limits(self): assert sorted( list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_OVERAGE_RETENTION_CACHE_KEY) ) == sorted([self.team.api_token, other_team.api_token]) - assert sorted(list_limited_team_attributes(QuotaResource.EVENTS)) == sorted(["1234"]) + assert sorted(list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY)) == sorted( + ["1234"] + ) # rows_synced uses teams, not tokens assert sorted( list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_OVERAGE_RETENTION_CACHE_KEY) ) == sorted([str(self.team.pk), str(other_team.pk)]) - assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED)) == sorted(["1337"]) + assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_LIMITER_CACHE_KEY)) == sorted( + ["1337"] + ) self.organization.usage["events"]["usage"] = 80 self.organization.usage["rows_synced"]["usage"] = 36 @@ -465,11 +469,15 @@ def test_sync_org_quota_limits(self): "rows_synced": {"limit": 100, "usage": 36}, "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } - assert sorted(list_limited_team_attributes(QuotaResource.EVENTS)) == sorted(["1234"]) + assert sorted(list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY)) == sorted( + ["1234"] + ) assert sorted( list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_OVERAGE_RETENTION_CACHE_KEY) ) == sorted([]) - assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED)) == sorted(["1337"]) + assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_LIMITER_CACHE_KEY)) == sorted( + ["1337"] + ) assert sorted( list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_OVERAGE_RETENTION_CACHE_KEY) ) == sorted([]) diff --git a/posthog/api/capture.py b/posthog/api/capture.py index b00c363e6de16..68d5a3dadfa63 100644 --- a/posthog/api/capture.py +++ b/posthog/api/capture.py @@ -20,19 +20,17 @@ from statshog.defaults.django import statsd from token_bucket import Limiter, MemoryStorage +from ee.billing.quota_limiting import QUOTA_LIMITER_CACHE_KEY from posthog.api.utils import get_data, get_token, safe_clickhouse_string from posthog.exceptions import generate_exception_response -from posthog.kafka_client.client import ( - KafkaProducer, - sessionRecordingKafkaProducer, -) +from posthog.kafka_client.client import KafkaProducer, sessionRecordingKafkaProducer from posthog.kafka_client.topics import ( KAFKA_EVENTS_PLUGIN_INGESTION_HISTORICAL, KAFKA_SESSION_RECORDING_EVENTS, KAFKA_SESSION_RECORDING_SNAPSHOT_ITEM_EVENTS, ) from posthog.logging.timing import timed -from posthog.metrics import LABEL_RESOURCE_TYPE, KLUDGES_COUNTER +from posthog.metrics import KLUDGES_COUNTER, LABEL_RESOURCE_TYPE from posthog.models.utils import UUIDT from posthog.session_recordings.session_recording_helpers import ( preprocess_replay_events_for_blob_ingestion, @@ -268,8 +266,8 @@ def drop_events_over_quota(token: str, events: List[Any]) -> List[Any]: from ee.billing.quota_limiting import QuotaResource, list_limited_team_attributes results = [] - limited_tokens_events = list_limited_team_attributes(QuotaResource.EVENTS) - limited_tokens_recordings = list_limited_team_attributes(QuotaResource.RECORDINGS) + limited_tokens_events = list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY) + limited_tokens_recordings = list_limited_team_attributes(QuotaResource.RECORDINGS, QUOTA_LIMITER_CACHE_KEY) for event in events: if event.get("event") in SESSION_RECORDING_EVENT_NAMES: From 6320dfc2985452db3619023d661bb68ebcf1633a Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Thu, 8 Feb 2024 16:55:01 -0800 Subject: [PATCH 10/11] fix typing --- ee/billing/quota_limiting.py | 53 ++++++----- ee/billing/test/test_quota_limiting.py | 127 ++++++++++++++++--------- posthog/api/capture.py | 10 +- posthog/api/test/test_capture.py | 22 +++-- 4 files changed, 130 insertions(+), 82 deletions(-) diff --git a/ee/billing/quota_limiting.py b/ee/billing/quota_limiting.py index 0dc785d1eb4dd..82f005d336e23 100644 --- a/ee/billing/quota_limiting.py +++ b/ee/billing/quota_limiting.py @@ -9,7 +9,6 @@ Sequence, Tuple, TypedDict, - Union, cast, ) @@ -32,13 +31,11 @@ ) from posthog.utils import get_current_day -QUOTA_LIMITER_CACHE_KEY = "@posthog/quota-limits/" # We are updating the quota limiting behavior so we retain data for DAYS_RETAIN_DATA days before # permanently dropping it. This will allow us to recover data in the case of incidents # where usage may have inadvertently exceeded a billing limit. # Ref: INC-144 DAYS_RETAIN_DATA = 3 -QUOTA_OVERAGE_RETENTION_CACHE_KEY = "@posthog/quota-overage-retention/" QUOTA_LIMIT_DATA_RETENTION_FLAG = "retain-data-past-quota-limit" @@ -49,6 +46,11 @@ class QuotaResource(Enum): ROWS_SYNCED = "rows_synced" +class QuotaLimitingRedisCaches(Enum): + QUOTA_OVERAGE_RETENTION_CACHE_KEY = "@posthog/quota-overage-retention/" + QUOTA_LIMITER_CACHE_KEY = "@posthog/quota-limits/" + + OVERAGE_BUFFER = { QuotaResource.EVENTS: 0, QuotaResource.RECORDINGS: 1000, @@ -57,9 +59,7 @@ class QuotaResource(Enum): def replace_limited_team_tokens( - resource: QuotaResource, - tokens: Mapping[str, int], - cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], + resource: QuotaResource, tokens: Mapping[str, int], cache_key: QuotaLimitingRedisCaches ) -> None: pipe = get_client().pipeline() pipe.delete(f"{cache_key}{resource.value}") @@ -69,28 +69,19 @@ def replace_limited_team_tokens( def add_limited_team_tokens( - resource: QuotaResource, - tokens: Mapping[str, int], - cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], + resource: QuotaResource, tokens: Mapping[str, int], cache_key: QuotaLimitingRedisCaches ) -> None: redis_client = get_client() redis_client.zadd(f"{cache_key}{resource.value}", tokens) # type: ignore # (zadd takes a Mapping[str, int] but the derived Union type is wrong) -def remove_limited_team_tokens( - resource: QuotaResource, - tokens: List[str], - cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], -) -> None: +def remove_limited_team_tokens(resource: QuotaResource, tokens: List[str], cache_key: QuotaLimitingRedisCaches) -> None: redis_client = get_client() redis_client.zrem(f"{cache_key}{resource.value}", *tokens) @cache_for(timedelta(seconds=30), background_refresh=True) -def list_limited_team_attributes( - resource: QuotaResource, - cache_key: Union[QUOTA_OVERAGE_RETENTION_CACHE_KEY, QUOTA_LIMIT_DATA_RETENTION_FLAG], -) -> List[str]: +def list_limited_team_attributes(resource: QuotaResource, cache_key: QuotaLimitingRedisCaches) -> List[str]: now = timezone.now() redis_client = get_client() results = redis_client.zrangebyscore(f"{cache_key}{resource.value}", min=now.timestamp(), max="+inf") @@ -194,16 +185,22 @@ def sync_org_quota_limits(organization: Organization): organization.save() if quota_limited_until and (data_retained_until and data_retained_until < round(today_start.timestamp())): add_limited_team_tokens( - resource, {x: quota_limited_until for x in team_attributes}, QUOTA_LIMITER_CACHE_KEY + resource, + {x: quota_limited_until for x in team_attributes}, + QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY, ) continue elif data_retained_until and data_retained_until >= today_start.timestamp(): add_limited_team_tokens( - resource, {x: data_retained_until for x in team_attributes}, QUOTA_OVERAGE_RETENTION_CACHE_KEY + resource, + {x: data_retained_until for x in team_attributes}, + QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY, ) continue - remove_limited_team_tokens(resource, team_attributes, QUOTA_LIMITER_CACHE_KEY) - remove_limited_team_tokens(resource, team_attributes, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + remove_limited_team_tokens(resource, team_attributes, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY) + remove_limited_team_tokens( + resource, team_attributes, QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) def get_team_attribute_by_quota_resource(organization: Organization, resource: QuotaResource): @@ -349,10 +346,10 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict for field in quota_limited_orgs: previously_quota_limited_team_tokens[field] = list_limited_team_attributes( - QuotaResource(field), QUOTA_LIMITER_CACHE_KEY + QuotaResource(field), QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY ) previously_data_retained_teams[field] = list_limited_team_attributes( - QuotaResource(field), QUOTA_OVERAGE_RETENTION_CACHE_KEY + QuotaResource(field), QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY ) quota_limited_teams: Dict[str, Dict[str, int]] = {key.value: {} for key in QuotaResource} @@ -395,9 +392,13 @@ def update_all_org_billing_quotas(dry_run: bool = False) -> Tuple[Dict[str, Dict if not dry_run: for field in data_retained_teams: replace_limited_team_tokens( - QuotaResource(field), data_retained_teams[field], QUOTA_OVERAGE_RETENTION_CACHE_KEY + QuotaResource(field), + data_retained_teams[field], + QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY, ) for field in quota_limited_teams: - replace_limited_team_tokens(QuotaResource(field), quota_limited_teams[field], QUOTA_LIMITER_CACHE_KEY) + replace_limited_team_tokens( + QuotaResource(field), quota_limited_teams[field], QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) return quota_limited_orgs, data_retained_orgs diff --git a/ee/billing/test/test_quota_limiting.py b/ee/billing/test/test_quota_limiting.py index 2d49d875f4b90..55e476f2ce8c0 100644 --- a/ee/billing/test/test_quota_limiting.py +++ b/ee/billing/test/test_quota_limiting.py @@ -9,8 +9,7 @@ from ee.billing.quota_limiting import ( QUOTA_LIMIT_DATA_RETENTION_FLAG, - QUOTA_LIMITER_CACHE_KEY, - QUOTA_OVERAGE_RETENTION_CACHE_KEY, + QuotaLimitingRedisCaches, QuotaResource, determine_org_quota_limit_or_data_retention, list_limited_team_attributes, @@ -30,9 +29,9 @@ class TestQuotaLimiting(BaseTest): def setUp(self) -> None: super().setUp() self.redis_client = get_client() - self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYevents") - self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYrecordings") - self.redis_client.delete("QUOTA_OVERAGE_RETENTION_CACHE_KEYrows_synced") + self.redis_client.delete("QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEYevents") + self.redis_client.delete("QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEYrecordings") + self.redis_client.delete("QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEYrows_synced") @patch("posthoganalytics.capture") @patch("posthoganalytics.feature_enabled", return_value=True) @@ -79,9 +78,9 @@ def test_dont_quota_limit_feature_flag_enabled(self, patch_feature_enabled, patc assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] @patch("posthoganalytics.capture") @patch("posthoganalytics.feature_enabled", return_value=True) @@ -107,9 +106,9 @@ def test_quota_limit_feature_flag_not_on(self, patch_feature_enabled, patch_capt assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] def test_billing_rate_limit_not_set_if_missing_org_usage(self) -> None: with self.settings(USE_TZ=False): @@ -137,9 +136,9 @@ def test_billing_rate_limit_not_set_if_missing_org_usage(self) -> None: assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] def test_billing_rate_limit(self) -> None: with self.settings(USE_TZ=False), freeze_time("2021-01-25T22:09:14.252Z"): @@ -174,9 +173,13 @@ def test_billing_rate_limit(self) -> None: assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + ) + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + ) self.organization.refresh_from_db() assert self.organization.usage == { @@ -201,9 +204,13 @@ def test_billing_rate_limit(self) -> None: assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + ) + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + ) self.organization.refresh_from_db() assert self.organization.usage == { @@ -228,11 +235,15 @@ def test_billing_rate_limit(self) -> None: assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [ + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [ self.team.api_token.encode("UTF-8") ] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + ) + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + ) self.organization.refresh_from_db() assert self.organization.usage == { @@ -257,9 +268,13 @@ def test_billing_rate_limit(self) -> None: assert quota_limited_orgs["recordings"] == {} assert quota_limited_orgs["rows_synced"] == {} - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] - assert self.redis_client.zrange(f"{QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + assert self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}events", 0, -1) == [] + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}recordings", 0, -1) == [] + ) + assert ( + self.redis_client.zrange(f"{QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY}rows_synced", 0, -1) == [] + ) self.organization.refresh_from_db() assert self.organization.usage == { @@ -422,8 +437,12 @@ def test_sync_org_quota_limits(self): now = timezone.now().timestamp() - replace_limited_team_tokens(QuotaResource.EVENTS, {"1234": now + 10000}, QUOTA_LIMITER_CACHE_KEY) - replace_limited_team_tokens(QuotaResource.ROWS_SYNCED, {"1337": now + 10000}, QUOTA_LIMITER_CACHE_KEY) + replace_limited_team_tokens( + QuotaResource.EVENTS, {"1234": now + 10000}, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) + replace_limited_team_tokens( + QuotaResource.ROWS_SYNCED, {"1337": now + 10000}, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) self.organization.usage = { "events": {"usage": 99, "limit": 100}, "recordings": {"usage": 1, "limit": 100}, @@ -432,8 +451,12 @@ def test_sync_org_quota_limits(self): } sync_org_quota_limits(self.organization) - assert list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY) == ["1234"] - assert list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_LIMITER_CACHE_KEY) == ["1337"] + assert list_limited_team_attributes( + QuotaResource.EVENTS, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) == ["1234"] + assert list_limited_team_attributes( + QuotaResource.ROWS_SYNCED, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) == ["1337"] self.organization.usage["events"]["usage"] = 120 self.organization.usage["rows_synced"]["usage"] = 120 @@ -446,19 +469,25 @@ def test_sync_org_quota_limits(self): "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } assert sorted( - list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + list_limited_team_attributes( + QuotaResource.EVENTS, QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) ) == sorted([self.team.api_token, other_team.api_token]) - assert sorted(list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY)) == sorted( - ["1234"] - ) + assert sorted( + list_limited_team_attributes(QuotaResource.EVENTS, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY) + ) == sorted(["1234"]) # rows_synced uses teams, not tokens assert sorted( - list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + list_limited_team_attributes( + QuotaResource.ROWS_SYNCED, QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) ) == sorted([str(self.team.pk), str(other_team.pk)]) - assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_LIMITER_CACHE_KEY)) == sorted( - ["1337"] - ) + assert sorted( + list_limited_team_attributes( + QuotaResource.ROWS_SYNCED, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) + ) == sorted(["1337"]) self.organization.usage["events"]["usage"] = 80 self.organization.usage["rows_synced"]["usage"] = 36 @@ -469,15 +498,21 @@ def test_sync_org_quota_limits(self): "rows_synced": {"limit": 100, "usage": 36}, "period": ["2021-01-01T00:00:00Z", "2021-01-31T23:59:59Z"], } - assert sorted(list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY)) == sorted( - ["1234"] - ) assert sorted( - list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + list_limited_team_attributes(QuotaResource.EVENTS, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY) + ) == sorted(["1234"]) + assert sorted( + list_limited_team_attributes( + QuotaResource.EVENTS, QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) ) == sorted([]) - assert sorted(list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_LIMITER_CACHE_KEY)) == sorted( - ["1337"] - ) assert sorted( - list_limited_team_attributes(QuotaResource.ROWS_SYNCED, QUOTA_OVERAGE_RETENTION_CACHE_KEY) + list_limited_team_attributes( + QuotaResource.ROWS_SYNCED, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) + ) == sorted(["1337"]) + assert sorted( + list_limited_team_attributes( + QuotaResource.ROWS_SYNCED, QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEY + ) ) == sorted([]) diff --git a/posthog/api/capture.py b/posthog/api/capture.py index 68d5a3dadfa63..ce3ac3211d573 100644 --- a/posthog/api/capture.py +++ b/posthog/api/capture.py @@ -20,7 +20,7 @@ from statshog.defaults.django import statsd from token_bucket import Limiter, MemoryStorage -from ee.billing.quota_limiting import QUOTA_LIMITER_CACHE_KEY +from ee.billing.quota_limiting import QuotaLimitingRedisCaches from posthog.api.utils import get_data, get_token, safe_clickhouse_string from posthog.exceptions import generate_exception_response from posthog.kafka_client.client import KafkaProducer, sessionRecordingKafkaProducer @@ -266,8 +266,12 @@ def drop_events_over_quota(token: str, events: List[Any]) -> List[Any]: from ee.billing.quota_limiting import QuotaResource, list_limited_team_attributes results = [] - limited_tokens_events = list_limited_team_attributes(QuotaResource.EVENTS, QUOTA_LIMITER_CACHE_KEY) - limited_tokens_recordings = list_limited_team_attributes(QuotaResource.RECORDINGS, QUOTA_LIMITER_CACHE_KEY) + limited_tokens_events = list_limited_team_attributes( + QuotaResource.EVENTS, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) + limited_tokens_recordings = list_limited_team_attributes( + QuotaResource.RECORDINGS, QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY + ) for event in events: if event.get("event") in SESSION_RECORDING_EVENT_NAMES: diff --git a/posthog/api/test/test_capture.py b/posthog/api/test/test_capture.py index a4d4e31bec34c..567bcb3ecf294 100644 --- a/posthog/api/test/test_capture.py +++ b/posthog/api/test/test_capture.py @@ -28,7 +28,7 @@ from rest_framework import status from token_bucket import Limiter, MemoryStorage -from ee.billing.quota_limiting import QUOTA_LIMITER_CACHE_KEY +from ee.billing.quota_limiting import QuotaLimitingRedisCaches from posthog.api import capture from posthog.api.capture import ( LIKELY_ANONYMOUS_IDS, @@ -1721,10 +1721,14 @@ def test_quota_limits_ignored_if_disabled(self, kafka_produce) -> None: from ee.billing.quota_limiting import QuotaResource, replace_limited_team_tokens replace_limited_team_tokens( - QuotaResource.RECORDINGS, {self.team.api_token: timezone.now().timestamp() + 10000}, QUOTA_LIMITER_CACHE_KEY + QuotaResource.RECORDINGS, + {self.team.api_token: timezone.now().timestamp() + 10000}, + QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY, ) replace_limited_team_tokens( - QuotaResource.EVENTS, {self.team.api_token: timezone.now().timestamp() + 10000}, QUOTA_LIMITER_CACHE_KEY + QuotaResource.EVENTS, + {self.team.api_token: timezone.now().timestamp() + 10000}, + QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY, ) self._send_august_2023_version_session_recording_event() self.assertEqual(kafka_produce.call_count, 1) @@ -1774,7 +1778,9 @@ def _produce_events(): ) replace_limited_team_tokens( - QuotaResource.EVENTS, {self.team.api_token: timezone.now().timestamp() + 10000}, QUOTA_LIMITER_CACHE_KEY + QuotaResource.EVENTS, + {self.team.api_token: timezone.now().timestamp() + 10000}, + QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY, ) _produce_events() self.assertEqual(kafka_produce.call_count, 1) # Only the recording event @@ -1782,7 +1788,7 @@ def _produce_events(): replace_limited_team_tokens( QuotaResource.RECORDINGS, {self.team.api_token: timezone.now().timestamp() + 10000}, - QUOTA_LIMITER_CACHE_KEY, + QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY, ) _produce_events() self.assertEqual(kafka_produce.call_count, 0) # No events @@ -1790,10 +1796,12 @@ def _produce_events(): replace_limited_team_tokens( QuotaResource.RECORDINGS, {self.team.api_token: timezone.now().timestamp() - 10000}, - QUOTA_LIMITER_CACHE_KEY, + QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY, ) replace_limited_team_tokens( - QuotaResource.EVENTS, {self.team.api_token: timezone.now().timestamp() - 10000}, QUOTA_LIMITER_CACHE_KEY + QuotaResource.EVENTS, + {self.team.api_token: timezone.now().timestamp() - 10000}, + QuotaLimitingRedisCaches.QUOTA_LIMITER_CACHE_KEY, ) _produce_events() self.assertEqual(kafka_produce.call_count, 3) # All events as limit-until timestamp is in the past From f5483e6cdce606c1079898439e381e551650da27 Mon Sep 17 00:00:00 2001 From: Bianca Yang Date: Thu, 8 Feb 2024 17:31:45 -0800 Subject: [PATCH 11/11] fix up some test setup --- ee/billing/test/test_quota_limiting.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ee/billing/test/test_quota_limiting.py b/ee/billing/test/test_quota_limiting.py index 55e476f2ce8c0..364d4b1d178c4 100644 --- a/ee/billing/test/test_quota_limiting.py +++ b/ee/billing/test/test_quota_limiting.py @@ -29,9 +29,12 @@ class TestQuotaLimiting(BaseTest): def setUp(self) -> None: super().setUp() self.redis_client = get_client() - self.redis_client.delete("QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEYevents") - self.redis_client.delete("QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEYrecordings") - self.redis_client.delete("QuotaLimitingRedisCaches.QUOTA_OVERAGE_RETENTION_CACHE_KEYrows_synced") + self.redis_client.delete("@posthog/quota-overage-retention/events") + self.redis_client.delete("@posthog/quota-overage-retention/recordings") + self.redis_client.delete("@posthog/quota-overage-retention/rows_synced") + self.redis_client.delete("@posthog/quota-limits/events") + self.redis_client.delete("@posthog/quota-limits/recordings") + self.redis_client.delete("@posthog/quota-limits/rows_synced") @patch("posthoganalytics.capture") @patch("posthoganalytics.feature_enabled", return_value=True)