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(data-warehouse): disable Sync now while a sync is running (#69008)

estefania01d70e010200
diff --git a/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsx b/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsx
index 02c6211242d2..547dac3d2175 100644
--- a/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsx
+++ b/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsx
@@ -301,7 +301,12 @@ function DetailsSection({
type="primary"
onClick={() => reloadSchema(schema)}
disabledReason={
- disabledReason ?? (!schema.sync_type ? 'Set up the sync method first' : undefined)
+ disabledReason ??
+ (!schema.sync_type
+ ? 'Set up the sync method first'
+ : schema.status === 'Running'
+ ? 'A sync is already running'
+ : undefined)
}
>
{schema.sync_type === 'cdc' ? 'Sync CDC now' : 'Sync now'}
diff --git a/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsx b/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsx
index 17df8ee7dba0..7e487676e12f 100644
--- a/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsx
+++ b/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsx
@@ -773,7 +773,13 @@ function SchemaRowMore({
size="xsmall"
fullWidth
onClick={() => reloadSchema(schema)}
- disabledReason={!schema.sync_type ? 'Set up the sync method first' : undefined}
+ disabledReason={
+ !schema.sync_type
+ ? 'Set up the sync method first'
+ : schema.status === 'Running'
+ ? 'A sync is already running'
+ : undefined
+ }
>
{schema.sync_type === 'cdc' ? 'Sync CDC now' : 'Sync now'}
</LemonButton>