: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): flag non-https self-managed bucket URLs before submit (#81013)
Tom Owers0ccce38950b6
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.test.ts b/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.test.tsindex 2c1837f3025c..300ec47b55ee 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.test.ts+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.test.ts@@ -32,4 +32,17 @@ describe('selfManagedTableFormErrors', () => {expect(errors.format).toBeFalsy()expect(errors.credential).toEqual({ access_key: false, access_secret: false })})++ // The backend rejects any non-https url pattern; these should surface a frontend error instead+ // of falling through to the generic server-side message.+ it.each([+ ['s3://your-org/invoices/*.pqt'],+ ['http://your-org.s3.amazonaws.com/invoices/*.pqt'],+ ['s3a://your-org/invoices/*.pqt'],+ ['your-org.s3.amazonaws.com/invoices/*.pqt'],+ ])('rejects non-https url pattern %s', (url_pattern) => {+ const errors = selfManagedTableFormErrors({ ...validTable, url_pattern })++ expect(errors.url_pattern).toBeTruthy()+ })})diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsx b/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsxindex c2e2706250ac..dea597da9459 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsx+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/selfManagedSourceLogic.tsx@@ -63,6 +63,15 @@ export function selfManagedTableFormErrors({}}+ // The backend only accepts https bucket URLs and rejects anything else (a bare path, http://,+ // s3a://, gs://) with a generic error, so catch those here with the same guidance as s3://.+ if (url_pattern && !url_pattern.startsWith('https://')) {+ return {+ url_pattern:+ 'Please use the https URL for your bucket, e.g. https://your-org.s3.amazonaws.com/airbyte/stripe/invoices/*.pqt',+ }+ }+return {name: !name && 'Please enter a name.',url_pattern: !url_pattern && 'Please enter a url pattern.',