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: run query_log_archive export on any node (#65663)

Andy Zhaod0544cef26a2
diff --git a/posthog/dags/common/resources.py b/posthog/dags/common/resources.py
index 23e322b8f65d..a818f5d04b6a 100644
--- a/posthog/dags/common/resources.py
+++ b/posthog/dags/common/resources.py
@@ -92,8 +92,11 @@ class OpsClickhouseClusterResource(dagster.ConfigurableResource):
max_execution_time: int
max_memory_usage: int
- host: str = settings.CLICKHOUSE_HOST
- cluster: str | None = None
+ # OPS is discoverable only from the migrations host/cluster: satellite discovery runs
+ # clusterAllReplicas(ops, system.clusters) WHERE cluster = <migrations cluster>, which the default
+ # app host/cluster don't match. Mirrors get_migrations_cluster, the path migrations use to reach OPS.
+ host: str = settings.CLICKHOUSE_MIGRATIONS_HOST
+ cluster: str = settings.CLICKHOUSE_MIGRATIONS_CLUSTER
def create_resource(self, context: dagster.InitResourceContext) -> ClickhouseCluster:
return get_cluster(