:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(data-warehouse): drop remaining default/billing-team remnants for managed warehouse (#73288)
Benjamin Knofe-Viderbe4221cc4a38
diff --git a/posthog/ducklake/test_cp_teams.py b/posthog/ducklake/test_cp_teams.pyindex f99d6271e51b..b82220e92be9 100644--- a/posthog/ducklake/test_cp_teams.py+++ b/posthog/ducklake/test_cp_teams.py@@ -14,7 +14,6 @@ def _row(**overrides) -> dict:"team_id": 1,"schema_name": "prod","enabled": True,- "is_billing_team": False,"backfill_enabled": True,"events_table_name": None,"persons_table_name": None,diff --git a/products/data_warehouse/backend/presentation/views/managed_warehouse.py b/products/data_warehouse/backend/presentation/views/managed_warehouse.pyindex a1b1229dc2e8..8c97c5d1a7cb 100644--- a/products/data_warehouse/backend/presentation/views/managed_warehouse.py+++ b/products/data_warehouse/backend/presentation/views/managed_warehouse.py@@ -306,10 +306,10 @@ def provision("/provision",json_body={"database_name": database_name,- # The provisioning team becomes the warehouse's first team (and its billing- # team): duckgres creates its team row with this schema. In-product this is- # the calling (currently active) team; in the Django admin it's the mandatory- # team field on the provision form.+ # The provisioning team becomes the warehouse's first team: duckgres creates+ # its team row with this schema. In-product this is the calling (currently+ # active) team; in the Django admin it's the mandatory team field on the+ # provision form."team_id": team_id,"schema_name": schema_name,"ducklake": {"enabled": True},@@ -449,7 +449,7 @@ def _persist_duckgres_server(organization_id: UUID | str, database_name: str | Ndef list_teams(organization_id: UUID | str, require_enabled: bool = True) -> Response:- """List the org's duckgres team rows (schema names, legacy table names, billing flag)."""+ """List the org's duckgres team rows (schema names, legacy table names)."""return _request("GET", organization_id, "/teams", require_enabled=require_enabled)@@ -568,7 +568,7 @@ def delete_team(organization_id: UUID | str, team_id: int, require_enabled: bool"""Delete a team row from the org's duckgres warehouse.duckgres answers 409 for the org's last team (the org must be deprovisioned or deleted- instead) and reassigns the billing flag to the oldest remaining team otherwise.+ instead)."""return _request("DELETE", organization_id, f"/teams/{team_id}", require_enabled=require_enabled)diff --git a/products/data_warehouse/backend/tests/api/test_managed_warehouse.py b/products/data_warehouse/backend/tests/api/test_managed_warehouse.pyindex 43b1dcf3053d..729a1ba4194f 100644--- a/products/data_warehouse/backend/tests/api/test_managed_warehouse.py+++ b/products/data_warehouse/backend/tests/api/test_managed_warehouse.py@@ -258,8 +258,9 @@ def test_provision_persists_duckgres_server_on_success(mock_request: MagicMock)@override_settings(CLOUD_DEPLOYMENT="US", DUCKGRES_PG_PORT=5432)@patch("products.data_warehouse.backend.presentation.views.managed_warehouse._request")def test_provision_sends_team_id_and_schema_name_to_control_plane(mock_request: MagicMock) -> None:- # The provisioning team becomes the warehouse's first (billing) team via the org-teams- # API: the outbound body carries team_id + schema_name and never default_team_id.+ # The provisioning team becomes the warehouse's first team via the org-teams API:+ # the outbound body carries team_id + schema_name and never default_team_id (dropped+ # along with duckgres's whole default/billing-team concept).org = Organization.objects.create(name="Org")team = Team.objects.create(organization=org)mock_request.return_value = Response(