Skip to content

: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.

fix(managed-warehouse): evaluate trino backfill flag remotely in dagster (#126661)

Eric Duong23c57d0d4d1b
diff --git a/products/managed_warehouse/backend/backfill_trino.py b/products/managed_warehouse/backend/backfill_trino.py
index 7488bc59149d..77ad053d3852 100644
--- a/products/managed_warehouse/backend/backfill_trino.py
+++ b/products/managed_warehouse/backend/backfill_trino.py
@@ -53,12 +53,13 @@ Replacement = DuckLakeDayReplacement | DuckLakeTableReplacement
def backfills_through_trino(organization_id: str) -> bool:
try:
+ # Dagster runs without POSTHOG_PERSONAL_API_KEY, so the client cannot load flag definitions there. A
+ # local-only evaluation would return off for every organization, so the client asks the flags service.
return feature_enabled_or_false(
DUCKLAKE_TRINO_REGISTRATION_FLAG,
organization_id,
groups={"organization": organization_id},
group_properties={"organization": {"id": organization_id}},
- only_evaluate_locally=True,
send_feature_flag_events=False,
)
except Exception as error: