: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
feat(data-warehouse): name the failing destination on source and sync rows (#115553)
Tom Owers408a3d25df70
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 544e3c4dc270..8a662f3221da 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -2901,25 +2901,29 @@ snapshots:data-quality-check-runs-table--every-check-type--light:hash: v1.k794b7964.dcb1f39625722782dbed6ce97b61684a7664c7d08034cefbb72cb32b6e97e3f3.c33MSTfBglNRA-pjdWyRCUxT8tOVGzg5lGO2CxSEyRcdata-warehouse-destinationlist--both-selected--dark:- hash: v1.k794b7964.5da0169833ea8b87e6d903cb4fc0f4d629a1b1db09149c5fb7c450ef312641a0.MH4OyaTjM18a4cpxtpCHPVm1QWWajZL5cz4NlzbJag0+ hash: v1.k794b7964.d648b7c9407d9f313e7dcffb5c56de3c517be9316e63596a9036eafbb7c226ec.Ycc98FBC8pZoyR-dZmRDz4909xDSaTV0OGoYe1jK8_8data-warehouse-destinationlist--both-selected--light:- hash: v1.k794b7964.a04d9a8cba7e3e7a4b16d0fd133b56d13252bbfde561fed7f83a1c1250c0fe3a.QLsXpO4tjZq831U9SXfJZXkcyn-XAcB3nbUbTS-1bMk+ hash: v1.k794b7964.326d315afac64096786cc8354bda907e342bc8717344d246c83e35dd5b3bd03b.lDj0tjVWz6uiEPUUumPPn0iJQR9tN1mTlstLWPFTBgIdata-warehouse-destinationlist--empty--dark:- hash: v1.k794b7964.5b25d5e8ff014a4cb34ffcbfc7568fba8c19aadd692de77f37ec0970151d1eff.GE7T2nmnyyFVA1ZACg7wjJRx7eVZW5Ci4hK_P_iRC_o+ hash: v1.k794b7964.f1debcbee5fe364a6a46dd39bea2bfea7d64db7d7d29a703c1b7551382cd2b50.LZ4jLPpmTG4ehmyccsDPT-oMMI-Mx7CzoZJiseQXrLsdata-warehouse-destinationlist--empty--light:- hash: v1.k794b7964.8241ee0362b2f6e0073de7f30f5c68afa47f4f23e313276d671bbf78ba91ae16.cRck4PSG75RYtojOnzBPN6f9aOLZ83w_l85Ej5iyHts+ hash: v1.k794b7964.f80fb45986e3063aeb5698c1f7695274a783200fd13d5456e730e4d6b07da7c5.WvYKontgHi-tzcGJSZSoLsjw4SfQLUtehaJK4c76Obs+ data-warehouse-destinationlist--failing-and-paused--dark:+ hash: v1.k794b7964.7a572b92a88627cb9fb2aeb9179677072d9825c581c6b8d9c471a628a991e1f9.0s2eVfPNwjQBpAOHNFctF0mAgAC2Eu4vpuyzkYVdLlU+ data-warehouse-destinationlist--failing-and-paused--light:+ hash: v1.k794b7964.303a48fd553d4722fa998241f3fcf11f840af648801863d54dc098dfd5ae01a4.hF7crAYfdMF91PIZD7vtU6Uu3pYdC4Jq-BXNHrAc5S4data-warehouse-destinationlist--inherited-from-source--dark:- hash: v1.k794b7964.c44f001cbc728edba036e401f6e284d3771a19a953c51a7aae1124096515f739.7BBFxPH7l4SOWD9KSIzfxgZFC_L4DOphrRTO0x-CP3o+ hash: v1.k794b7964.d0caf80b9098ff7dfb5aafa4cd832fbc0aa798fa83c72b7907634a87d2ff8f8e.l9jtP2BIZBRDddnLjVr0yyAg9fwX8D4JDvYqJdeWbKgdata-warehouse-destinationlist--inherited-from-source--light:- hash: v1.k794b7964.8ea1a2db6498c4a2231dab1588b6aa597ce0ca5397d3d0ed4046992470aba010.EJx53hPzMGFBUAmL36EmpGmdU0DGn4c4sZwOfF-r0FQ+ hash: v1.k794b7964.3088c8bdf847a99b038864ad6ae14959ef1220234139cc83686eff75de3f1fbd.LXZDZrofinLxHkPX0-HDLO9diEO2jEVjoRO8EiOLoWcdata-warehouse-destinationlist--loading--dark:- hash: v1.k794b7964.4c547e76477fd7c16c982f60a56ccda8227f3e879a4ca085c219547eb57dd47b.ZUTg5YvL_d_0vftz7fV8wEwsKx6gJKBfEsocNyW_MiE+ hash: v1.k794b7964.659ef1676e6edd45b4ae6b8b627247d5cb5491f431e6ca77520b48a393d51114._NuI7mGnixai_oFaQ9oLtRzf8hzeTb2BdKq5TXBQM44data-warehouse-destinationlist--loading--light:- hash: v1.k794b7964.478218b655fde7084770f8fdddc604238523e073c3f55fc1d32082794e4a8b51.U7PeVHVYl24e9YeBMAZq_B6WuJHPqJc2gY9xzjvdpI0+ hash: v1.k794b7964.c39fdf7b1941eb8ae8787a8058539b9102209721f83fe028fe5203ca41c7651f.OSwdcM3zZqg3nNjtCIG5mzpz0YwIBRxe67psRopg6I0data-warehouse-destinationlist--only-one-left--dark:- hash: v1.k794b7964.9b522de92c0ec0977626e3e694a64ceceda80fa691f50c490c906a06b012d0dd.ai1KpccNrHIv4qosfkQoeeTHQ1hkIw2rvoNF7Q3Yriw+ hash: v1.k794b7964.2d479ebd1c383eb672bcb74c6796fc2cf69aa268e0fe6053fde76f4c0a6eadfe.nNKov9e5SycI4zwdu-l78YbtMy59knjaA-rg1WIedq0data-warehouse-destinationlist--only-one-left--light:- hash: v1.k794b7964.e73d80636fa8aec2163ca81b6615ab5ae432296f391a74623cda19d1ab34f542.RCgSTjXC1oN6_ir0V3CST_szMCiJdf6beKhAr2rg4wA+ hash: v1.k794b7964.2f70feb2e05f2129de0d19e6bdf5a81d8433b42edb432aa07859134b7c4f38c2.poFAm0KBjGn277ZpXuTVser9G-m00hU1-Fa28NmuwlQdata-warehouse-destinationmodal--azure-blob--dark:hash: v1.k794b7964.59e2fab0e54439f87a02d90e578b6fc21984cfc817f576ad58ec2d941cdb224b.A4nwKDTtbyovK35VoGF_AGLHAF5LjiPQ6z4H8-22DVcdata-warehouse-destinationmodal--azure-blob--light:@@ -2948,6 +2952,10 @@ snapshots:hash: v1.k794b7964.7850b437d0b757b20409473a16858b9ef875f35021e592521bdf94b2876e85c5.ix5aXJkl2sMIrSYeEmiT_OgH7Eb94qxUEEAt_DvutJkdata-warehouse-jobdestinations--destination-since-deleted--light:hash: v1.k794b7964.1006a4fb83ff9f0134af7e919f30ca873aac4f04b8dfd068eb631717a884d43d.tkCjdAFZpkv34Y6e9vv--B5P7ZPcYHIGZJl6wb26oVc+ data-warehouse-jobdestinations--failed-destination--dark:+ hash: v1.k794b7964.17c2c5e8b85a6af4d417f818f3c077e9862a64338e171c6b8e02978adf86a993.w4amGcAYmsd7N-Ay6xMdpJxOFld_UbYTx2nHh4iSFGI+ data-warehouse-jobdestinations--failed-destination--light:+ hash: v1.k794b7964.73e9ac3026278e9f1b32cc431a87afc74c837a47c3af524fd97277d61bad02b1.NXNH61CJt-weLa-WNHbrlPWcVkQ62HPq-Nu7D694fkwdata-warehouse-jobdestinations--still-loading--dark:hash: v1.k794b7964.dea76b53ba18d6bfe40ecb75b1a64fab690266a082624956d99f67a6e0b6ebf8.xA22JNcrso3fgiZdWGiwIW94beEQN4ka7hHIwybKxSodata-warehouse-jobdestinations--still-loading--light:@@ -9954,6 +9962,18 @@ snapshots:hash: v1.k794b7964.29db22c3b08716e199dd09fcfe32c7c924d4333c23bcbc3469e474f9352e74fd.tTXVCBk9y3Ra_laJOUeUKRXcwuzKWb5FIL1sQ4DEBP8scenes-app-data-warehouse-settings-api-version-deprecation-banner--without-sunset-date--light:hash: v1.k794b7964.5538a3b913cdaf075ffa11b124181028792db175d494b4ddfc464b7c136abad1.lRLOGn7WM05iOpm8oCLLc5FkYge6teK_L_hm0JgjlLE+ scenes-app-data-warehouse-settings-failing-destinations--failing--dark:+ hash: v1.k794b7964.a651994f6cd70bc511e6fba3bdd4c78c15645b00976629e0bbc4c5adfa2afc15.vOV5UFp5NoRhaH55e7JHcrFTB9AEDgC55uSvQSZmw5A+ scenes-app-data-warehouse-settings-failing-destinations--failing--light:+ hash: v1.k794b7964.340eb07d7104bbcc935d852f2e36e316c3e6cd2e4e452cb66cc8600b0d89b9fb.J-QMiEKZrFdW7aSWLOJ8EtIlNI3mbQiB7WzCP6XsxVY+ scenes-app-data-warehouse-settings-failing-destinations--failing-and-paused--dark:+ hash: v1.k794b7964.14e7d94f4b4e90f88eecffd71df505932db9101ad4eaf48191b4fefbfa540577.4v_pI4tzZqr0OTiibkrdqZmT0niWJ6Ruey1SnkJeH4U+ scenes-app-data-warehouse-settings-failing-destinations--failing-and-paused--light:+ hash: v1.k794b7964.e0605c560a64a89ad334131ba40d07641ec1bc61d370452177a49ba494c83889.82lARqhfzYriD2Ybd-kaWw_VOqeIvicyK4DSsRHIEiM+ scenes-app-data-warehouse-settings-failing-destinations--paused--dark:+ hash: v1.k794b7964.f9f8fa8cc5110f61d298be468c1297dec857277af660fe9a2e1eced57dbf4f51.4akPWjaPOB4FuYiqYbuhoIvDyVBbS5_HP-WJfzarEjw+ scenes-app-data-warehouse-settings-failing-destinations--paused--light:+ hash: v1.k794b7964.97ea2ed405206dc8d86b16af69c4168b60bba272ed4927cd17b1da68b5ff9985._-h3M823TnnKmaHHOpaKaf1i2yM7T922YzMMRhestsoscenes-app-data-warehouse-settings-schemas--default--dark:hash: v1.k794b7964.2731d66d7ae4e5a789e0fc6f8a331b259cbcb3ec25416c79fe3a1ce3e583fdbc.Dgzs4lWk8hphWWfySWhK75GKpeq4fzL3Z9KAkrVVl80scenes-app-data-warehouse-settings-schemas--default--light:@@ -13149,7 +13169,7 @@ snapshots:scenes-app-posthog-ai--thread-scrolls-to-bottom-on-new-messages--dark:hash: v1.k794b7964.6308f9e71b7f609897baee5c5fe5af1deb321882ecb0761fbf22051bb6531999.YXmikTdEmed3mJWRiglAFw66r284ajZbdJI5sT8kUAIscenes-app-posthog-ai--thread-scrolls-to-bottom-on-new-messages--light:- hash: v1.k794b7964.13bce2f4f6ed0899909ef5a6261c72f409fe30a7ec4c6a1c02e7c4eb090374d4.kbYsuacysknHFSd2MtkTXvrnkzsH-OsDPL3pVHUwBuU+ hash: v1.k794b7964.9211dcf9c515e87b72f3ce6208c9913f76224cf39c84d1de746f9739c14e237e.La1EOtlNXIzCBAzxaCSFdXkAt8Dd6AO50S2WZvknd3sscenes-app-posthog-ai--thread-with-billing-limit-exceeded--dark:hash: v1.k794b7964.a0d21c8c69c049c37c367b855ea3dd19101d1194a9acf37dfa02fc3207be2351.L7hSSTjk8fML5gmTu4hX60CZJZ1S6pbMxZ_kefFURNsscenes-app-posthog-ai--thread-with-billing-limit-exceeded--light:diff --git a/frontend/src/products.tsx b/frontend/src/products.tsxindex 5e04d135b698..a5144c9bd272 100644--- a/frontend/src/products.tsx+++ b/frontend/src/products.tsx@@ -1484,6 +1484,8 @@ export const productUrls = {return `/data-warehouse/new-source${queryString ? `?${queryString}` : ''}`},warehouseDestinations: (): string => '/data-management/warehouse-destinations',+ warehouseDestination: (id: string): string =>+ `/data-management/warehouse-destinations?destination=${encodeURIComponent(id)}`,dataWarehouseSourceConnect: (kind?: string): string =>`/data-warehouse/connect${kind ? `?kind=${encodeURIComponent(kind)}` : ''}`,earlyAccessFeatures: (): string => '/early_access_features',diff --git a/products/data_warehouse/frontend/scenes/SourceScene/FailingDestinationsBanner.stories.tsx b/products/data_warehouse/frontend/scenes/SourceScene/FailingDestinationsBanner.stories.tsxnew file mode 100644index 000000000000..89674f47a1a8--- /dev/null+++ b/products/data_warehouse/frontend/scenes/SourceScene/FailingDestinationsBanner.stories.tsx@@ -0,0 +1,63 @@+import type { Meta, StoryObj } from '@storybook/react'++import { useStorybookMocks } from '~/mocks/browser'+import externalDataSourceResponseMock from '~/mocks/fixtures/api/projects/team_id/external_data_sources/externalDataSource.json'++import type { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'++import { FailingDestinationsBanner } from './FailingDestinationsBanner'++const FAILING: ExternalDataDestinationApi = {+ id: 'failing-postgres',+ type: 'Postgres',+ name: 'Analytics Postgres',+ is_posthog_warehouse: false,+ status: 'failing',+ latest_error: 'Analytics Postgres: Could not connect to the database.',+ latest_error_at: '2026-08-20T10:00:00Z',+ created_at: '2026-08-20T10:00:00Z',+ updated_at: null,+ created_by: null,+ synced_sources: [],+}+const PAUSED: ExternalDataDestinationApi = {+ ...FAILING,+ id: 'paused-postgres',+ name: 'Reporting Postgres',+ status: 'paused',+ latest_error: 'Reporting Postgres: Destination configuration error. The database does not exist.',+}++type BannerStoryProps = { sourceId: string; destinations: ExternalDataDestinationApi[] }+type Story = StoryObj<BannerStoryProps>+const meta: Meta<BannerStoryProps> = {+ title: 'Scenes-App/Data Warehouse/Settings/Failing destinations',+ component: FailingDestinationsBanner,+ args: { sourceId: '123' },+ parameters: { mockDate: '2026-08-20', viewMode: 'story' },+ render: ({ sourceId, destinations }) => {+ useStorybookMocks({+ get: {+ '/api/environments/:team_id/external_data_destinations': () => [+ 200,+ { results: destinations, count: destinations.length, next: null, previous: null },+ ],+ '/api/environments/:team_id/external_data_sources/:id/destinations': () => [+ 200,+ { destination_ids: destinations.map((destination) => destination.id) },+ ],+ '/api/environments/:team_id/external_data_sources/:id': () => [+ 200,+ { ...externalDataSourceResponseMock, id: sourceId, schemas: [] },+ ],+ },+ })++ return <FailingDestinationsBanner sourceId={sourceId} />+ },+}+export default meta++export const Failing: Story = { args: { destinations: [FAILING] } }+export const Paused: Story = { args: { destinations: [PAUSED] } }+export const FailingAndPaused: Story = { args: { destinations: [FAILING, PAUSED] } }diff --git a/products/data_warehouse/frontend/scenes/SourceScene/FailingDestinationsBanner.tsx b/products/data_warehouse/frontend/scenes/SourceScene/FailingDestinationsBanner.tsxnew file mode 100644index 000000000000..1974011b8f4d--- /dev/null+++ b/products/data_warehouse/frontend/scenes/SourceScene/FailingDestinationsBanner.tsx@@ -0,0 +1,60 @@+import { useValues } from 'kea'++import { LemonBanner, Link } from '@posthog/lemon-ui'++import { urls } from 'scenes/urls'++import { destinationsLogic } from './tabs/destinationsLogic'++export function FailingDestinationsBanner({ sourceId }: { sourceId: string }): JSX.Element | null {+ const { unhealthyDestinations } = useValues(destinationsLogic({ sourceId }))++ if (unhealthyDestinations.length === 0) {+ return null+ }++ return (+ <div className="flex flex-col gap-2">+ {unhealthyDestinations.map((destination) => {+ const paused = destination.status === 'paused'+ const nameLink = (+ <Link to={urls.warehouseDestination(destination.id)} data-attr="warehouse-destination-banner-link">+ {destination.name}+ </Link>+ )+ return (+ <LemonBanner key={destination.id} type={paused ? 'error' : 'warning'}>+ <div className="flex flex-col gap-1 min-w-0 break-words">+ <div>+ {paused ? (+ <>+ {nameLink}+ <span>+ {' '}+ is paused after repeated delivery failures. Tables that sync only to this+ destination are not running.+ </span>+ </>+ ) : (+ <>+ <span>Syncs are failing to deliver to </span>+ {nameLink}+ <span>.</span>+ </>+ )}+ </div>+ {destination.latest_error && (+ <div className="text-xs break-words">{destination.latest_error}</div>+ )}+ <div>+ {paused+ ? 'Open the destination and save it to resume.'+ : 'Open the destination to fix its settings.'}+ </div>+ </div>+ </LemonBanner>+ )+ })}+ </div>+ )+}diff --git a/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsx b/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsxindex 86cebc4dcceb..7cdd23366974 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsx+++ b/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.tsx@@ -45,6 +45,7 @@ import {import { SourceAlerts } from 'products/data_warehouse/frontend/shared/sourceAlerts/SourceAlerts'import { cleanSourceId, isSelfManagedSourceId } from 'products/data_warehouse/frontend/utils'+import { FailingDestinationsBanner } from './FailingDestinationsBanner'import { ConfigurationTab } from './tabs/ConfigurationTab'import { DestinationsTab } from './tabs/DestinationsTab'import { MetricsTab } from './tabs/MetricsTab'@@ -385,6 +386,7 @@ function ManagedSourceTabs({deprecation={source.api_version_deprecation}/>)}+ {showDestinationsTab && <FailingDestinationsBanner sourceId={sourceId} />}<LemonTabsactiveKey={currentTab}tabs={tabs}diff --git a/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsx b/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsxindex a82c4a3e3c3d..cdee37625b75 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsx+++ b/products/data_warehouse/frontend/scenes/SourceScene/tabs/SchemasTab.tsx@@ -13,6 +13,7 @@ import {LemonTable,LemonTag,LemonTagType,+ Link,Spinner,Tooltip,} from '@posthog/lemon-ui'@@ -40,6 +41,7 @@ import {ExternalDataSourceSchema,} from '~/types'+import { failedDestinationFor } from 'products/data_warehouse/frontend/shared/components/destinationFailure'import {splitQualifiedTableName,supportsDirectQuery,@@ -49,6 +51,7 @@ import {SchemaEditorAction,SourceEditorAction,} from 'products/data_warehouse/frontend/shared/components/SourceEditorAction'+import { destinationLookupLogic } from 'products/data_warehouse/frontend/shared/logics/destinationLookupLogic'import { sourceManagementLogic } from 'products/data_warehouse/frontend/shared/logics/sourceManagementLogic'import {IncrementalSyncBlockedMessageMap,@@ -58,6 +61,7 @@ import {SyncTypeLabelMap,allowedSyncFrequencies,} from 'products/data_warehouse/frontend/utils'+import type { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'import { DirectQuerySchemasTab } from './DirectQuerySchemasTab'import { BulkSyncMethod, bulkSyncMethodDisabledReason, sourceSettingsLogic } from './sourceSettingsLogic'@@ -168,6 +172,15 @@ function ManagedSchemasTab({ id }: { id: string }): JSX.Element {loadJobs,} = useActions(sourceSettingsLogic)const { featureFlags } = useValues(featureFlagLogic)+ const { loadDestinations } = useActions(destinationLookupLogic)+ const { destinationsById } = useValues(destinationLookupLogic)+ const showDestinations = !!featureFlags[FEATURE_FLAGS.WAREHOUSE_MULTI_DESTINATION]++ useEffect(() => {+ if (showDestinations) {+ loadDestinations()+ }+ }, [showDestinations, loadDestinations])// Load (and poll) jobs so the Row count column can show live progress for in-progress// syncs, before the warehouse table exists. loadJobsSuccess reschedules itself.@@ -331,6 +344,7 @@ function ManagedSchemasTab({ id }: { id: string }): JSX.Element {deleteTable={deleteTable}openAccessControl={openAccessControl}showMetrics={showMetrics}+ destinationsById={showDestinations ? destinationsById : {}}/>),}))}@@ -350,6 +364,7 @@ function ManagedSchemasTab({ id }: { id: string }): JSX.Element {deleteTable={deleteTable}openAccessControl={openAccessControl}showMetrics={showMetrics}+ destinationsById={showDestinations ? destinationsById : {}}/>)}{accessControlSchema?.table && (@@ -380,6 +395,7 @@ interface ManagedSchemaTableProps {/** Undefined when the warehouse access control feature is off. */openAccessControl?: (schema: ExternalDataSourceSchema) => voidshowMetrics: boolean+ destinationsById: Record<string, ExternalDataDestinationApi>/** Rendered inside a namespace group — the group header already shows the namespace, so strip it from row names. */inSchemaGroup?: boolean}@@ -397,6 +413,7 @@ function ManagedSchemaTable({deleteTable,openAccessControl,showMetrics,+ destinationsById,inSchemaGroup = false,}: ManagedSchemaTableProps): JSX.Element {const { schemaReloadingById } = useValues(sourceManagementLogic)@@ -494,13 +511,35 @@ function ManagedSchemaTable({{label}</LemonTag>)- return tooltip ? (+ const statusTag = tooltip ? (<Tooltip title={tooltip} interactive>{tagContent}</Tooltip>) : (tagContent)+ const destination =+ schema.status === ExternalDataSchemaStatus.Failed+ ? failedDestinationFor(+ schema.latest_error,+ Object.keys(destinationsById),+ destinationsById+ )+ : null+ return (+ <div className="flex flex-col items-start gap-1">+ {statusTag}+ {destination && (+ <Link+ className="text-xs"+ to={urls.warehouseDestination(destination.id)}+ data-attr="warehouse-schema-failed-destination-link"+ >+ {`Could not deliver to ${destination.name}`}+ </Link>+ )}+ </div>+ )},},{diff --git a/products/data_warehouse/frontend/scenes/SourceScene/tabs/SyncsTab.tsx b/products/data_warehouse/frontend/scenes/SourceScene/tabs/SyncsTab.tsxindex 7c9bd393f0f7..c55358d40f9a 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/tabs/SyncsTab.tsx+++ b/products/data_warehouse/frontend/scenes/SourceScene/tabs/SyncsTab.tsx@@ -16,6 +16,7 @@ import { userLogic } from 'scenes/userLogic'import { ExternalDataJob, ExternalDataJobStatus, LogEntryLevel } from '~/types'+import { failedDestinationFor } from 'products/data_warehouse/frontend/shared/components/destinationFailure'import { JobDestinations } from 'products/data_warehouse/frontend/shared/components/JobDestinations'import { destinationLookupLogic } from 'products/data_warehouse/frontend/shared/logics/destinationLookupLogic'@@ -196,6 +197,15 @@ export const SyncsTab = ({ id, lockedSchema }: SyncsTabProps): JSX.Element => {destinationIds={job.destination_ids ?? []}destinationsById={destinationsById}loading={destinationsLoading}+ failedDestinationId={+ job.status === ExternalDataJobStatus.Failed && job.latest_error+ ? failedDestinationFor(+ job.latest_error,+ job.destination_ids ?? [],+ destinationsById+ )?.id+ : undefined+ }/>),},diff --git a/products/data_warehouse/frontend/scenes/SourceScene/tabs/destinationsLogic.ts b/products/data_warehouse/frontend/scenes/SourceScene/tabs/destinationsLogic.tsindex 663a243ac580..d375163328f0 100644--- a/products/data_warehouse/frontend/scenes/SourceScene/tabs/destinationsLogic.ts+++ b/products/data_warehouse/frontend/scenes/SourceScene/tabs/destinationsLogic.ts@@ -35,6 +35,7 @@ export interface destinationsLogicValues {sourceSchemas: ExternalDataSourceSchema[]sourceSchemasLoading: booleansyncedSchemas: ExternalDataSourceSchema[]+ unhealthyDestinations: ExternalDataDestinationApi[]}// Generated by kea-typegen. Update if you're an agent, ignore if you're human.@@ -117,6 +118,10 @@ export interface destinationsLogicActions {export interface destinationsLogicMeta {key: string__keaTypeGenInternalSelectorTypes: {+ unhealthyDestinations: (+ destinations: ExternalDataDestinationApi[],+ savedDestinationIds: string[]+ ) => ExternalDataDestinationApi[]hasUnsavedChanges: (attachedDestinationIds: string[], savedDestinationIds: string[]) => booleansaveDisabledReason: (attachedDestinationIds: string[], hasUnsavedChanges: boolean) => string | nulladdedDestinationIds: (attachedDestinationIds: string[], savedDestinationIds: string[]) => string[]@@ -201,6 +206,16 @@ export const destinationsLogic = kea<destinationsLogicType>([],}),selectors({+ unhealthyDestinations: [+ (s) => [s.destinations, s.savedDestinationIds],+ (destinations: ExternalDataDestinationApi[], savedDestinationIds: string[]): ExternalDataDestinationApi[] =>+ destinations.filter(+ (destination) =>+ savedDestinationIds.includes(destination.id) &&+ !destination.is_posthog_warehouse &&+ destination.status !== 'healthy'+ ),+ ],hasUnsavedChanges: [(s) => [s.attachedDestinationIds, s.savedDestinationIds],(attached: string[], saved: string[]): boolean =>diff --git a/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.tsx b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.tsxindex 842ca5545b26..d992c01d03f4 100644--- a/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.tsx+++ b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.tsx@@ -1,28 +1,20 @@import type { ReactNode } from 'react'import { IconPencil, IconTrash } from '@posthog/icons'-import { LemonButton, LemonTable, LemonTableColumn, LemonTag, LemonTagType, Link } from '@posthog/lemon-ui'+import { LemonButton, LemonTable, LemonTableColumn, LemonTag, Link } from '@posthog/lemon-ui'import { More } from 'lib/lemon-ui/LemonButton/More'import { updatedAtColumn } from 'lib/lemon-ui/LemonTable/columnUtils'-import {- ExternalDataDestinationApi,- ExternalDataDestinationStatusEnumApi,-} from 'products/warehouse_sources/frontend/generated/api.schemas'+import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'import { DestinationIcon, destinationTypeLabel } from '../../shared/components/DestinationIcon'+import { DESTINATION_STATUS_TAGS } from '../../shared/components/destinationStatus'import { destinationTarget } from '../../shared/components/destinationTarget'import { SyncedSources } from './SyncedSources'const MANAGED_REASON = 'The PostHog warehouse is managed for you'-const STATUS_TAGS: Record<ExternalDataDestinationStatusEnumApi, { label: string; type: LemonTagType }> = {- healthy: { label: 'Healthy', type: 'success' },- failing: { label: 'Failing', type: 'warning' },- paused: { label: 'Paused', type: 'danger' },-}-export interface WarehouseDestinationsTableProps {destinations: ExternalDataDestinationApi[]loading: boolean@@ -90,7 +82,7 @@ export function WarehouseDestinationsTable({if (destination.is_posthog_warehouse) {return null}- const tag = STATUS_TAGS[destination.status]+ const tag = DESTINATION_STATUS_TAGS[destination.status]return (<div className="flex flex-col items-start gap-1 max-w-80"><LemonTag type={tag.type}>{tag.label}</LemonTag>diff --git a/products/data_warehouse/frontend/shared/components/DestinationList.stories.tsx b/products/data_warehouse/frontend/shared/components/DestinationList.stories.tsxindex 651c76a3e14e..276f322fe679 100644--- a/products/data_warehouse/frontend/shared/components/DestinationList.stories.tsx+++ b/products/data_warehouse/frontend/shared/components/DestinationList.stories.tsx@@ -11,6 +11,7 @@ const WAREHOUSE: ExternalDataDestinationApi = {config: {},integration: null,is_posthog_warehouse: true,+ status: 'healthy',created_at: '2026-08-20T10:00:00Z',updated_at: '2026-08-25T10:00:00Z',created_by: null,@@ -23,6 +24,7 @@ const POSTGRES: ExternalDataDestinationApi = {config: { database: 'analytics', schema: 'customer_sync' },integration: 1,is_posthog_warehouse: false,+ status: 'healthy',created_at: '2026-08-24T10:00:00Z',updated_at: '2026-08-26T14:00:00Z',created_by: null,@@ -46,6 +48,22 @@ BothSelected.args = {onEdit: () => {},}+export const FailingAndPaused = Template.bind({})+FailingAndPaused.args = {+ ...BothSelected.args,+ destinations: [+ WAREHOUSE,+ { ...POSTGRES, status: 'failing', latest_error: 'Customer Postgres: Could not connect to the database.' },+ {+ ...POSTGRES,+ id: 'paused-postgres',+ name: 'Reporting Postgres',+ status: 'paused',+ latest_error: 'Reporting Postgres: Destination configuration error. The database does not exist.',+ },+ ],+}+export const OnlyOneLeft = Template.bind({})OnlyOneLeft.args = {...BothSelected.args,diff --git a/products/data_warehouse/frontend/shared/components/DestinationList.tsx b/products/data_warehouse/frontend/shared/components/DestinationList.tsxindex 3e229d782972..892075a4ab85 100644--- a/products/data_warehouse/frontend/shared/components/DestinationList.tsx+++ b/products/data_warehouse/frontend/shared/components/DestinationList.tsx@@ -2,11 +2,13 @@ import { IconPencil } from '@posthog/icons'import { LemonButton, LemonSwitch, LemonTable, LemonTableColumn, LemonTag } from '@posthog/lemon-ui'import { AppMetricsSparkline } from 'lib/components/AppMetrics/AppMetricsSparkline'+import { Tooltip } from 'lib/lemon-ui/Tooltip'import { DATA_WAREHOUSE_APP_SOURCE } from 'products/data_warehouse/frontend/shared/components/metrics/DataWarehouseMetrics'import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'import { DestinationIcon, destinationTypeLabel } from './DestinationIcon'+import { DESTINATION_STATUS_TAGS } from './destinationStatus'import { destinationTarget } from './destinationTarget'export interface DestinationListProps {@@ -63,6 +65,25 @@ export function DestinationList({</LemonTag>),},+ {+ title: 'Status',+ key: 'status',+ render: (_, destination) => {+ if (+ destination.is_posthog_warehouse ||+ (destination.status !== 'failing' && destination.status !== 'paused')+ ) {+ return null+ }+ const tag = DESTINATION_STATUS_TAGS[destination.status]+ const tagContent = <LemonTag type={tag.type}>{tag.label}</LemonTag>+ return destination.latest_error ? (+ <Tooltip title={destination.latest_error}>{tagContent}</Tooltip>+ ) : (+ tagContent+ )+ },+ },...(metricsSourceId? [{diff --git a/products/data_warehouse/frontend/shared/components/JobDestinations.stories.tsx b/products/data_warehouse/frontend/shared/components/JobDestinations.stories.tsxindex 8a7e4dbd3531..36506219c9bf 100644--- a/products/data_warehouse/frontend/shared/components/JobDestinations.stories.tsx+++ b/products/data_warehouse/frontend/shared/components/JobDestinations.stories.tsx@@ -39,6 +39,12 @@ TwoDestinations.args = {destinationsById: BY_ID,}+export const FailedDestination = Template.bind({})+FailedDestination.args = {+ ...TwoDestinations.args,+ failedDestinationId: POSTGRES.id,+}+export const WarehouseOnly = Template.bind({})WarehouseOnly.args = {destinationIds: [WAREHOUSE.id],diff --git a/products/data_warehouse/frontend/shared/components/JobDestinations.test.tsx b/products/data_warehouse/frontend/shared/components/JobDestinations.test.tsxindex 6f65289acf86..7838f8abd03d 100644--- a/products/data_warehouse/frontend/shared/components/JobDestinations.test.tsx+++ b/products/data_warehouse/frontend/shared/components/JobDestinations.test.tsx@@ -48,6 +48,28 @@ describe('JobDestinations', () => {expect(screen.getByAltText('Postgres')).toBeInTheDocument()})+ test.each([+ { description: 'marked', failedDestinationId: POSTGRES.id, marked: true },+ { description: 'unmarked', failedDestinationId: undefined, marked: false },+ { description: 'another destination marked', failedDestinationId: WAREHOUSE.id, marked: false },+ ])('shows the failure state with the logo $description', ({ failedDestinationId, marked }) => {+ render(+ <JobDestinations+ destinationIds={[POSTGRES.id]}+ destinationsById={{ [POSTGRES.id]: { ...POSTGRES, config: {} } }}+ failedDestinationId={failedDestinationId}+ />+ )++ const logo = screen.getByAltText('Postgres').parentElement!+ if (marked) {+ expect(logo).toHaveClass('rounded', 'ring-2', 'ring-danger')+ } else {+ expect(logo).not.toHaveClass('ring-2')+ expect(logo).not.toHaveClass('ring-danger')+ }+ })+it('stays quiet while the destination lookup is still loading', () => {render(<JobDestinations destinationIds={[POSTGRES.id]} destinationsById={{}} loading />)diff --git a/products/data_warehouse/frontend/shared/components/JobDestinations.tsx b/products/data_warehouse/frontend/shared/components/JobDestinations.tsxindex 38d09dc69b42..6c03cd35e106 100644--- a/products/data_warehouse/frontend/shared/components/JobDestinations.tsx+++ b/products/data_warehouse/frontend/shared/components/JobDestinations.tsx@@ -1,4 +1,5 @@import { Tooltip } from 'lib/lemon-ui/Tooltip'+import { cn } from 'lib/utils/css-classes'import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'@@ -12,6 +13,7 @@ export interface JobDestinationsProps {destinationsById?: Record<string, ExternalDataDestinationApi>/** True while `destinationsById` is still being fetched, so an id is not yet unknown. */loading?: boolean+ failedDestinationId?: string}interface Logo {@@ -26,7 +28,12 @@ function tooltipFor(destination: ExternalDataDestinationApi): string {}/** Where one run delivered, as a logo each. */-export function JobDestinations({ destinationIds, destinationsById = {}, loading }: JobDestinationsProps): JSX.Element {+export function JobDestinations({+ destinationIds,+ destinationsById = {},+ loading,+ failedDestinationId,+}: JobDestinationsProps): JSX.Element {const known = destinationIds.map((id) => destinationsById[id]).filter(Boolean)if (destinationIds.length > 0 && known.length === 0) {@@ -58,8 +65,15 @@ export function JobDestinations({ destinationIds, destinationsById = {}, loadingreturn (<div className="flex items-center gap-1">{logos.map(({ key, type, title }) => (- <Tooltip key={key} title={title}>- <span className="flex items-center justify-center size-5">+ <Tooltip+ key={key}+ title={key === failedDestinationId ? `${title}. Could not deliver this run.` : title}+ >+ <span+ className={cn('flex items-center justify-center size-5', {+ 'rounded ring-2 ring-danger': key === failedDestinationId,+ })}+ ><imgsrc={DESTINATION_ICON_MAP[type]}alt={destinationTypeLabel(type)}diff --git a/products/data_warehouse/frontend/shared/components/destinationFailure.test.ts b/products/data_warehouse/frontend/shared/components/destinationFailure.test.tsnew file mode 100644index 000000000000..f7cbe6ddbbdf--- /dev/null+++ b/products/data_warehouse/frontend/shared/components/destinationFailure.test.ts@@ -0,0 +1,96 @@+import type { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'++import { failedDestinationFor } from './destinationFailure'++const PROD: ExternalDataDestinationApi = {+ id: 'prod',+ name: 'Prod',+ type: 'Postgres',+ is_posthog_warehouse: false,+ status: 'failing',+ latest_error: null,+ latest_error_at: null,+ created_at: '2026-08-20T10:00:00Z',+ updated_at: null,+ created_by: null,+ synced_sources: [],+}+const MY_PROD: ExternalDataDestinationApi = { ...PROD, id: 'my-prod', name: 'My Prod' }+const WAREHOUSE: ExternalDataDestinationApi = {+ ...PROD,+ id: 'warehouse',+ name: 'PostHog warehouse',+ type: 'PostHogWarehouse',+ is_posthog_warehouse: true,+}+const REGEX_NAME: ExternalDataDestinationApi = { ...PROD, id: 'regex', name: 'Prod [a+b].* (db)?' }+const BY_ID = Object.fromEntries(+ [PROD, MY_PROD, WAREHOUSE, REGEX_NAME].map((destination) => [destination.id, destination])+)++describe('failedDestinationFor', () => {+ test.each<{+ description: string+ error: string | null | undefined+ candidates: string[]+ expected: ExternalDataDestinationApi | null+ }>([+ { description: 'prefix at the start', error: 'Prod: boom', candidates: [PROD.id], expected: PROD },+ {+ description: 'prefix after a retry message',+ error: 'max retries exceeded: Prod: boom',+ candidates: [PROD.id],+ expected: PROD,+ },+ {+ description: 'a name that contains another name',+ error: 'My Prod: boom',+ candidates: [PROD.id, MY_PROD.id],+ expected: MY_PROD,+ },+ { description: 'a suffix alone', error: 'My Prod: boom', candidates: [PROD.id], expected: null },+ {+ description: 'the longest matching name',+ error: 'Prod: My Prod: boom',+ candidates: [PROD.id, MY_PROD.id],+ expected: MY_PROD,+ },+ {+ description: 'the longest match regardless of order',+ error: 'Prod: My Prod: boom',+ candidates: [MY_PROD.id, PROD.id],+ expected: MY_PROD,+ },+ { description: 'an unknown ID', error: 'Prod: boom', candidates: ['unknown'], expected: null },+ {+ description: 'an unknown ID before a match',+ error: 'Prod: boom',+ candidates: ['unknown', PROD.id],+ expected: PROD,+ },+ {+ description: 'a warehouse row',+ error: 'PostHog warehouse: boom',+ candidates: [WAREHOUSE.id],+ expected: null,+ },+ { description: 'a null error', error: null, candidates: [PROD.id], expected: null },+ { description: 'an undefined error', error: undefined, candidates: [PROD.id], expected: null },+ { description: 'an empty error', error: '', candidates: [PROD.id], expected: null },+ { description: 'no candidates', error: 'Prod: boom', candidates: [], expected: null },+ {+ description: 'a name with regex characters',+ error: `${REGEX_NAME.name}: boom`,+ candidates: [REGEX_NAME.id],+ expected: REGEX_NAME,+ },+ {+ description: 'a name without a separator',+ error: 'max retries exceeded Prod: boom',+ candidates: [PROD.id],+ expected: null,+ },+ ])('matches $description', ({ error, candidates, expected }) => {+ expect(failedDestinationFor(error, candidates, BY_ID)).toBe(expected)+ })+})diff --git a/products/data_warehouse/frontend/shared/components/destinationFailure.ts b/products/data_warehouse/frontend/shared/components/destinationFailure.tsnew file mode 100644index 000000000000..72a6cd51c6bb--- /dev/null+++ b/products/data_warehouse/frontend/shared/components/destinationFailure.ts@@ -0,0 +1,27 @@+import type { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'++export function failedDestinationFor(+ latestError: string | null | undefined,+ candidateIds: readonly string[],+ destinationsById: Record<string, ExternalDataDestinationApi>+): ExternalDataDestinationApi | null {+ if (!latestError) {+ return null+ }++ let match: ExternalDataDestinationApi | null = null+ for (const id of candidateIds) {+ const destination = destinationsById[id]+ if (!destination || destination.is_posthog_warehouse) {+ continue+ }+ const prefix = `${destination.name}: `+ if (+ (latestError.startsWith(prefix) || latestError.includes(`: ${prefix}`)) &&+ (!match || destination.name.length > match.name.length)+ ) {+ match = destination+ }+ }+ return match+}diff --git a/products/data_warehouse/frontend/shared/components/destinationStatus.ts b/products/data_warehouse/frontend/shared/components/destinationStatus.tsnew file mode 100644index 000000000000..b2c57c34211a--- /dev/null+++ b/products/data_warehouse/frontend/shared/components/destinationStatus.ts@@ -0,0 +1,12 @@+import type { LemonTagType } from '@posthog/lemon-ui'++import type { ExternalDataDestinationStatusEnumApi } from 'products/warehouse_sources/frontend/generated/api.schemas'++export const DESTINATION_STATUS_TAGS: Record<+ ExternalDataDestinationStatusEnumApi,+ { label: string; type: LemonTagType }+> = {+ healthy: { label: 'Healthy', type: 'success' },+ failing: { label: 'Failing', type: 'warning' },+ paused: { label: 'Paused', type: 'danger' },+}diff --git a/products/data_warehouse/manifest.tsx b/products/data_warehouse/manifest.tsxindex a1b5b4d1ed13..c2642a6c011d 100644--- a/products/data_warehouse/manifest.tsx+++ b/products/data_warehouse/manifest.tsx@@ -145,6 +145,8 @@ export const manifest: ProductManifest = {return `/data-warehouse/new-source${queryString ? `?${queryString}` : ''}`},warehouseDestinations: (): string => '/data-management/warehouse-destinations',+ warehouseDestination: (id: string): string =>+ `/data-management/warehouse-destinations?destination=${encodeURIComponent(id)}`,dataWarehouseSourceConnect: (kind?: string): string =>`/data-warehouse/connect${kind ? `?kind=${encodeURIComponent(kind)}` : ''}`,},diff --git a/services/mcp/src/tools/links/app-url-manifest.json b/services/mcp/src/tools/links/app-url-manifest.jsonindex 1afb9b946798..737bdb01a47c 100644--- a/services/mcp/src/tools/links/app-url-manifest.json+++ b/services/mcp/src/tools/links/app-url-manifest.json@@ -1874,6 +1874,11 @@"params": ["repoOwner", "repoName"],"scope": "project"},+ "warehouseDestination": {+ "template": "/data-management/warehouse-destinations",+ "params": [],+ "scope": "project"+ },"warehouseDestinations": {"template": "/data-management/warehouse-destinations","params": [],