: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(data-warehouse): read self-managed table provider from its url when editing (#117578)
Tom Owersfa0e94d57b5b
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/components/SelfManagedSourceForm.tsx b/products/data_warehouse/frontend/scenes/NewSourceScene/components/SelfManagedSourceForm.tsxindex d68dbd30a8b2..11d7741135ca 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/components/SelfManagedSourceForm.tsx+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/components/SelfManagedSourceForm.tsx@@ -7,7 +7,7 @@ import { LemonField } from 'lib/lemon-ui/LemonField'import { ManualLinkSourceType } from '~/types'-import { describeStorageProviderMismatch } from '../../../shared/storageProvider'+import { describeStorageProviderMismatch, storageProviderFromUrl } from '../../../shared/storageProvider'import { selfManagedSourceLogic } from '../selfManagedSourceLogic'import { sourceWizardLogic } from '../sourceWizardLogic'@@ -58,7 +58,8 @@ export function SelfManagedSourceForm({ onUpdate }: Props): JSX.Element {const { manualLinkingProvider } = useValues(sourceWizardLogic)const { table } = useValues(selfManagedSourceLogic)- const provider = manualLinkingProvider ?? 'aws'+ // A saved table stores no provider: the backend reads it from the URL host, so the edit form does too.+ const provider = (onUpdate ? storageProviderFromUrl(table?.url_pattern) : manualLinkingProvider) ?? 'aws'const isCsvFormat = table?.format === 'CSV' || table?.format === 'CSVWithNames'const providerMismatch = describeStorageProviderMismatch(table?.url_pattern, provider)