: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
fix: attribute delivery export assets to the subscription owner (#68177)
Alex Lider0b6beac77cdf
diff --git a/posthog/temporal/tests/test_subscriptions_workflows.py b/posthog/temporal/tests/test_subscriptions_workflows.pyindex c94e17ae38e0..e257aedac59b 100644--- a/posthog/temporal/tests/test_subscriptions_workflows.py+++ b/posthog/temporal/tests/test_subscriptions_workflows.py@@ -914,6 +914,9 @@ async def test_create_export_assets_creates_exported_assets(assert asset.team_id == team.idassert asset.insight_id == insight.idassert asset.export_format == "image/png"+ # The exporter renders the insight as the asset's creator — without it the render is userless+ # and warehouse access control fails closed, breaking deliveries of warehouse-backed insights.+ assert asset.created_by_id == user.id# SLO started is emitted by the interceptor, not this activity. Internal QueryRunner.run()# calls during snapshot build emit query_service SLO events — those are unrelated.diff --git a/products/exports/backend/temporal/subscriptions/activities.py b/products/exports/backend/temporal/subscriptions/activities.pyindex 0821820a69f8..fe02dd1f9594 100644--- a/products/exports/backend/temporal/subscriptions/activities.py+++ b/products/exports/backend/temporal/subscriptions/activities.py@@ -233,6 +233,9 @@ async def create_export_assets(inputs: CreateExportAssetsInputs) -> CreateExportinsight=insight,dashboard=dashboard,expires_after=expiry,+ # The exporter runs the insight query as the asset's creator; without it the render is+ # userless and warehouse access control fails closed, breaking subscription deliveries.+ created_by=subscription.created_by,)for _tile, insight in export_pairs]