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): remove duplicate materialization error tag (#122280)

Jovan Sakovic623eae3ac097
diff --git a/frontend/src/scenes/data-warehouse/saved_queries/MaterializationStatusPanel.tsx b/frontend/src/scenes/data-warehouse/saved_queries/MaterializationStatusPanel.tsx
index b80ff76b6318..9d0ea7b3b36f 100644
--- a/frontend/src/scenes/data-warehouse/saved_queries/MaterializationStatusPanel.tsx
+++ b/frontend/src/scenes/data-warehouse/saved_queries/MaterializationStatusPanel.tsx
@@ -206,11 +206,6 @@ export function MaterializationStatusPanel({
<div>
<div className="flex flex-row items-center gap-2">
{!hideTitle && <h3 className="mb-0">Materialization</h3>}
- {showStatusSummary && savedQuery?.latest_error && savedQuery.status === 'Failed' && (
- <Tooltip title={savedQuery.latest_error} interactive>
- <LemonTag type="danger">Error</LemonTag>
- </Tooltip>
- )}
</div>
{showStatusSummary && showSuspendedBanner && suspension && (
<LemonBanner type="error" className="mt-2">
diff --git a/frontend/src/scenes/data-warehouse/saved_queries/materializationJobsLogic.test.ts b/frontend/src/scenes/data-warehouse/saved_queries/materializationJobsLogic.test.ts
index 7ddd8de367d5..cc85cc0d887e 100644
--- a/frontend/src/scenes/data-warehouse/saved_queries/materializationJobsLogic.test.ts
+++ b/frontend/src/scenes/data-warehouse/saved_queries/materializationJobsLogic.test.ts
@@ -150,6 +150,30 @@ describe('materializationJobsLogic', () => {
}
})
+ it('shows the failed run status without a detached error tag', async () => {
+ const mocks = apiMocks({
+ isMaterialized: true,
+ savedQueryExtras: { status: 'Failed', latest_error: 'Query failed' },
+ })
+ mocks.get!['/api/projects/:team_id/data_modeling_jobs/'] = [
+ 200,
+ {
+ count: 1,
+ results: [{ id: 'run-1', status: 'Failed', error: 'Query failed' }],
+ },
+ ]
+ useMocks(mocks)
+ logic = materializationJobsLogic({ viewId: 'view-1' })
+ logic.mount()
+ await expectLogic(logic).toDispatchActions(['loadSavedQuerySuccess', 'loadDataModelingJobsSuccess'])
+
+ render(createElement(MaterializationStatusPanel, { viewId: 'view-1', showRunActions: false }))
+
+ expect(screen.getByText('Last run')).toBeTruthy()
+ expect(screen.getAllByText('Failed').length).toBeGreaterThan(0)
+ expect(screen.getByText('Materialization').parentElement?.children).toHaveLength(1)
+ })
+
it('pages through older runs without changing the latest run or growing polling requests', async () => {
const mocks = apiMocks({ isMaterialized: true })
const requests: string[] = []