Skip to content

feat(data-warehouse): add trino monitoring tab to data ops - #110371

Merged
EDsCODE merged 6 commits into
eric/data-ops-trino-variant-backendfrom
eric/data-ops-trino-monitoring-frontend
Oct 6, 2026
Merged

EDsCODE merged 6 commits into
eric/data-ops-trino-variant-backendfrom
eric/data-ops-trino-monitoring-frontend

Conversation

@EDsCODE

@EDsCODE EDsCODE commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

  • A Trino organization that opens Data ops sees a Monitoring tab about DuckDB workers, which do not serve its queries.
  • An organization that has only data-warehouse-scene-trino cannot reach Data ops at all, because a nav item accepts one flag.
  • This PR is layer 3 of 4, on top of feat(data-warehouse): add trino monitoring endpoints and mcp tools #110370. It shows the data from the endpoints in that layer.

Changes

  • A Trino organization gets a Monitoring tab about queries: six live cards, eight history charts, and a table of the queries in flight.

Trino monitoring tab at 1400px

  • An expanded row shows the source, queue time, CPU time, peak memory, rows read, start time, and the full SQL with literal values masked.

Expanded query row

  • A warning banner and dashes replace the live cards when the live data cannot be read. Zeros would read as an idle warehouse.

Live data unavailable

  • A failed refresh keeps the last good data and marks the section that failed.
  • Data ops appears in the nav, search, and product lists when either flag is on.
  • A DuckDB organization keeps the Monitoring tab it has today.

At 520px the cards and charts stack, and the query table scrolls sideways:

Monitoring tab at 520px Trino monitoring tab at 520px

The Trino tab is a new surface, so it has no before screenshot. All data in the screenshots is invented.

Where to look first:

  • FileSystemImport.alternativeFlags and isFileSystemImportFlagEnabled are the only changes outside the Data ops scene. They touch ten nav call sites. An item without alternativeFlags behaves as before.
  • dataOpsVariantFromFlags picks the variant once, with the same rule as the backend: the Trino flag wins.
  • The Trino tab and its kea logic are near-copies of the DuckDB ones on purpose. One tab with a variant switch would tie the two paths together.

Mechanical: the DuckDB tab's card, chart, and section components move into their own files so both tabs share them. The generated schema files follow the new nav field.

How did you test this code?

Test rationale:

  • The isFileSystemImportFlagEnabled cases catch a nav item that hides when only its alternative flag is on. The helper is new.
  • The scene logic cases catch the wrong variant for each flag combination. The existing cases cover the single flag.
  • does not present an unavailable coordinator as an idle warehouse catches zeros shown for unreadable live data.
  • keeps the last good data and marks each section when refreshes fail catches a failed poll that blanks the tab.
  • stops polling after unmount catches a poll that keeps running after the user leaves the tab.

The screenshots come from Storybook with mocked API responses, at 1400px and 520px.

Not checked:

  • Nothing ran against a live Trino cell or the deployed endpoints.
  • The DuckDB Monitoring tab was not rendered again after its components moved.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Release status

  • No feature flag controls this change
  • This change is behind a feature flag and is not available to users
  • This change makes a previously flagged feature available to everyone

Automatic notifications

  • Publish to changelog?

Docs update

None. The variant is not available to users.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code. Claude Sonnet 5.5 subagents wrote the code. Claude Opus 5.5 planned and coordinated the work.

  • The four layers came from one written design and plan. A separate subagent reviewed each task, and one more reviewed the whole stack.
  • Skills invoked: superpowers:brainstorming, superpowers:writing-plans, superpowers:subagent-driven-development, superpowers:using-git-worktrees, /stacking-prs, /writing-pr-descriptions, /reviewing-with-coderabbit.
  • CodeRabbit CLI pass: skipped. The CLI was signed out and setup was declined.
  • Bot review threads, all resolved:
    • Handled in feat(data-warehouse): show trino connection in data ops settings #110372: the status poll through Trino setup, and the Trino connection details in Settings.
    • Not changed: Monitoring stays hidden while the Trino status cannot be read. The design shows Overview and Monitoring only when the warehouse and Trino are both ready. Settings then says "Couldn't check the query engine status. Refresh to try again."
  • Restacked onto master on 2026-10-06. Master moved the Today tools list into scenes/tools/toolsLogic.ts, so the any-flag nav check moved there too. Master also removed the Data quality tab from Data ops (chore(data-warehouse): remove data quality tab from data ops #110906), so this layer no longer handles that tab.
  • No duplicate: a search of open PRs for the Trino Data ops variant found nothing.
  • Public artifact: no customer material informed this work. Every fixture and screenshot uses invented names and example.com hosts.
  • A task review changed one thing here: the expanded query row had a fixed maximum width and now uses the table width.

🤖 Generated with Claude Code

@EDsCODE
EDsCODE added this pull request to stack #110373 October 1, 2026 21:54
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

⚠️ Complexity (TypeScript) — 12 functions above the limit (max 39)

Cyclomatic complexity above the limit in changed typescript files (10 for production files, 15 for test files). Warn only: worth simplifying when you next touch these functions.

Function Location Complexity Limit
queueAction frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx:789 39 10
<anonymous> frontend/src/lib/components/Search/searchLogic.tsx:1597 35 10
<anonymous> frontend/src/lib/components/Search/searchLogic.tsx:1457 28 10
<anonymous> frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx:1352 26 10
<anonymous> frontend/src/lib/components/Search/searchLogic.tsx:1355 20 10
TrinoMonitoringTab products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoMonitoringTab.tsx:99 18 10
<anonymous> frontend/src/layout/panel-layout/navbar/tabs/flat-nav/flatNavLogic.ts:55 14 10
MonitoringTab products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringTab.tsx:284 14 10
loadFolder frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx:1837 12 10
saveStarredProducts frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts:789 11 10
<anonymous> frontend/src/lib/components/Search/searchLogic.tsx:987 11 10
SummaryCards products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringTab.tsx:124 11 10
✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

⚠️ Duplication (TypeScript) — 9 new duplicated blocks (worst 478 tokens)

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

First copy Second copy Lines Tokens
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseMonitoringLogic.ts:286 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.ts:265 83 478
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseMonitoringLogic.test.ts:226 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.test.ts:118 33 200
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseMonitoringLogic.ts:246 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.ts:231 34 163
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseMonitoringLogic.ts:192 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.ts:177 25 152
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringTab.tsx:263 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoHistoricalCharts.tsx:101 20 104
frontend/src/products.tsx:2293 products/data_warehouse/manifest.tsx:161 26 94
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringTab.tsx:299 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoMonitoringTab.tsx:114 24 94
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseMonitoringLogic.ts:226 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.ts:211 21 79
products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringTab.tsx:219 products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoHistoricalCharts.tsx:45 12 73
⚠️ Bundle size — 🔺 +22.3 KiB (+0.0%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 76.06 MiB · 🔺 +22.3 KiB (+0.0%)

File Size Δ vs base
posthog-app/_parent/products/data_warehouse/frontend/scenes/DataOpsScene/DataWarehouseScene.js 61.6 KiB 🔺 +12.5 KiB (+25.6%)

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

⚠️ Eager graph — 2 over budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.64 MiB · 23 files 🔺 +304 B (+0.0%) █████████░ 88.9% of 1.84 MiB
logged-out boot: index + App + bootApp (preloaded by every page, including /login)
src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
3.72 MiB · 663 files 🔺 +409 B (+0.0%) █████████░ 92.4% of 4.03 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
7.60 MiB · 2,405 files 🔺 +1.2 KiB (+0.0%) █████████░ 91.1% of 8.34 MiB
🟡 dashboard scene
src/scenes/dashboard/Dashboard.tsx
13.91 MiB · 4,918 files 🔺 +1.2 KiB (+0.0%) ██████████ 103.2% of 13.48 MiB
today home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
7.62 MiB · 2,417 files 🔺 +1.2 KiB (+0.0%) █████████░ 88.8% of 8.58 MiB
🟡 events scene
src/scenes/activity/explore/EventsScene.tsx
13.64 MiB · 4,790 files 🔺 +1.2 KiB (+0.0%) ██████████ 108.0% of 12.64 MiB
replay detail scene
src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
12.13 MiB · 4,143 files 🔺 +1.2 KiB (+0.0%) ████████░░ 77.2% of 15.72 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/dashboards/frontend/widgets/previews/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 zod/v4/locales/de.js stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/project-homepage/today/TodayReportPage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/index.tsx
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
839 B src/scenes/ChunkLoadErrorBoundary.tsx
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
Size File
306.2 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
220.3 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
99.7 KiB src/lib/api.ts
90.7 KiB src/products.tsx
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
40.7 KiB src/lib/utils/eventUsageLogic.ts
38.7 KiB ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
33.9 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
29.0 KiB ../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
306.2 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.3 KiB src/taxonomy/core-filter-definitions-by-group.json
220.3 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
112.3 KiB ../packages/quill/packages/quill/dist/index.js
99.7 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.7 KiB src/products.tsx
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
Size File
315.5 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
306.2 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.3 KiB src/taxonomy/core-filter-definitions-by-group.json
220.3 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
181.8 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
112.3 KiB ../packages/quill/packages/quill/dist/index.js
99.7 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
Size File
306.2 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.3 KiB src/taxonomy/core-filter-definitions-by-group.json
220.3 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
112.3 KiB ../packages/quill/packages/quill/dist/index.js
99.7 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.7 KiB src/products.tsx
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
Size File
315.5 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
306.2 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.3 KiB src/taxonomy/core-filter-definitions-by-group.json
220.3 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
181.8 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
112.3 KiB ../packages/quill/packages/quill/dist/index.js
99.7 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Size File
315.5 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
306.2 KiB ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.3 KiB src/taxonomy/core-filter-definitions-by-group.json
220.3 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
181.8 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
112.3 KiB ../packages/quill/packages/quill/dist/index.js
99.7 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

✅ Toolbar bundle — eager 2.21 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.21 MiB · 19 files 🔺 +360 B (+0.0%) ████░░░░░░ 38.7% of 5.72 MiB
Deferred (lazy) 2.12 MiB · 44 files no change n/a — loads on demand
Loader dist/toolbar.js 1.2 KiB no change █░░░░░░░░░ 6.0% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
851.2 KiB dist/toolbar/toolbar-app-NRHKTWXU.css
657.5 KiB dist/toolbar/chunk-chunk-GEFFN7AU.js
259.4 KiB dist/toolbar/chunk-chunk-6EL3FW4B.js
138.2 KiB dist/toolbar/chunk-chunk-RXQP4VID.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
75.2 KiB dist/toolbar/toolbar-app-NTNFGYPU.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-KKPXRYOI.js
21.0 KiB dist/toolbar/chunk-chunk-GNLHSNAR.js
6.8 KiB dist/toolbar/chunk-chunk-DV7IWQNF.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +167.1 KiB (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 999.04 MiB · 🔺 +167.1 KiB (+0.0%)

@EDsCODE EDsCODE changed the title eric/data ops trino monitoring frontend feat(data-warehouse): add trino monitoring tab to data ops Oct 1, 2026
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Retrigger

[Medium risk] Adds Trino monitoring UI to the data warehouse feature.

The PR is not safe to merge independently: Trino monitoring can remain inaccessible, and ready Trino warehouses lack connection details in Settings.

Reviews (1) · Last reviewed commit: "fix(data-warehouse): let the trino query..."

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Walkthrough

Filesystem imports now support alternative feature flags, and visibility filters use a shared eligibility helper. The Data warehouse scene now selects between DuckDB and Trino variants. The Trino variant adds monitoring snapshot and time-series loading, polling, charts, summary cards, and query details.

Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to 6fefb

Resolve the alternative-flag visibility gap and provide Trino connection details—or keep the Trino flag inactive—before merging. As written, Trino organizations can reach Settings without seeing their connection details.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 6fefb

The new monitoring view uses existing read APIs rather than granting new backend privileges. Organization checks and context-switch resets provide useful controls. Upstream SQL masking and cleanup of requests already in flight when the page closes remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The intended monitoring scope is the organization-wide warehouse shared by its teams, not just activity from the selected project. The browser receives query usernames, client-reported sources and SQL text, making organization isolation and masking the principal confidentiality boundaries.

Trust Boundaries and Controls

  • observed — The existing monitoring actions declare warehouse_view:read and resource-level access. Requests derive organization identity from the server-side team, the adapter checks organization feature enablement, and response validation rejects a mismatched organization ID. Metric and window inputs are allow-listed; series validation also checks the returned metric and allowed label names.
  • observed — Alternative flags govern frontend visibility, while authorization predicates are separate. The inspected change does not turn alternativeFlags into a backend authorization grant, and its sole actual producer retains the primary flag.

Resilience and Maintainability Implications

  • observed — Monitoring state is owned by the current team context. Switching teams disposes polling handles and clears previous snapshot and series data before reloading, removing previous-team query text from the table's data source. Breakpoint checks protect publication during replacement requests; unmount/remount behavior remains a separate coverage gap.

Hardening Proposals

  • proposed — Define alternative-only eligibility explicitly before additional producers adopt the contract: either evaluate alternatives without a primary flag or reject that combination. This would prevent future visibility-control drift across shared consumers; it is not an observed authorization bypass in this PR.
  • proposed — Before broader rollout, establish producer-side fail-closed SQL masking and demonstrate that responses resolving after monitoring unmount cannot populate a later mount under another context. These checks would close confidentiality proof gaps rather than confirm an already observed defect.
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the user impact, visible changes, testing rationale, limitations, release status, and agent context. Minor template gaps remain: it does not link the agent session or report p…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (2)
frontend/src/queries/schema/schema-general.ts-5510-5510 (1)

5510-5510: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Check alternative flags when flag is absent.

FileSystemImport allows alternativeFlags without flag, but isFileSystemImportFlagEnabled returns true immediately when flag is absent. Items gated only by alternative flags therefore remain visible when those flags are off. Check configured flags before the always-visible fallback, or require a primary flag when alternativeFlags is set. See frontend/src/lib/utils/fileSystemImportFlags.ts (lines 6-15).

products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.ts-209-247 (1)

209-247: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not render a series from a different monitoring window.

Selecting 1h updates monitoringWindow and starts all nine 1h requests. If they all fail, the loader retains the previous successful 24h series. The charts still render that series while the control shows 1h. The warning does not identify the retained window.

Filter the series by monitoringSeriesWindow before rendering.

Suggested fix
@@
         monitoringSeries,
+        monitoringSeriesWindow,
         initialMonitoringSeriesLoading,
         monitoringSeriesLoading,
@@
     const initialLoading = monitoringSnapshotLoading && !monitoringSnapshot
     const liveDataUnavailable = !!monitoringSnapshot && !monitoringSnapshot.available
+    const visibleMonitoringSeries =
+        monitoringSeriesWindow === monitoringWindow ? monitoringSeries : []
+    const seriesLoadingForWindow =
+        initialMonitoringSeriesLoading ||
+        (monitoringSeriesLoading && monitoringSeriesWindow !== monitoringWindow)
@@
-                    {monitoringSeries.length > 0
+                    {visibleMonitoringSeries.length > 0
                         ? "Some historical metrics couldn't be refreshed. Available charts show the most recent data."
                         : "Historical metrics couldn't be loaded. Refresh to try again."}
@@
             <TrinoHistoricalCharts
-                monitoringSeries={monitoringSeries}
-                initialLoading={initialMonitoringSeriesLoading}
+                monitoringSeries={visibleMonitoringSeries}
+                initialLoading={seriesLoadingForWindow}
             />

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: PostHog/posthog/.coderabbit.yaml

Review profile: QUIET

Plan: Enterprise

Run ID: a084b38e-9e5c-4a45-8a86-c17d6e7c4e3c

📥 Commits

Reviewing files that changed from the base of the PR and between 11f2725 and 59507ad.

📒 Files selected for processing (33)
  • frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx
  • frontend/src/layout/panel-layout/navbar/tabs/flat-nav/flatNavLogic.ts
  • frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts
  • frontend/src/layout/today/todayToolsLogic.ts
  • frontend/src/lib/components/NavPanelAdvertisement/navPanelProductPushAdLogic.ts
  • frontend/src/lib/components/Search/searchLogic.tsx
  • frontend/src/lib/constants.tsx
  • frontend/src/lib/utils/fileSystemImportFlags.test.ts
  • frontend/src/lib/utils/fileSystemImportFlags.ts
  • frontend/src/products.tsx
  • frontend/src/queries/schema.json
  • frontend/src/queries/schema/schema-general.ts
  • frontend/src/scenes/library/libraryLogic.ts
  • frontend/src/scenes/settings/user/SidebarSettings.tsx
  • posthog/schema.py
  • products/data_warehouse/frontend/scenes/DataOpsScene/DataWarehouseScene.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/dataOpsVariant.ts
  • products/data_warehouse/frontend/scenes/DataOpsScene/dataWarehouseSceneLogic.test.ts
  • products/data_warehouse/frontend/scenes/DataOpsScene/dataWarehouseSceneLogic.ts
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringChart.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringMetricCard.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringSection.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/MonitoringTab.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoHistoricalCharts.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoMonitoringSummaryCards.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoMonitoringTab.test.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoMonitoringTab.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/TrinoQueryDetails.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.test.ts
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/managedWarehouseTrinoMonitoringLogic.ts
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/monitoringChartData.ts
  • products/data_warehouse/frontend/scenes/DataOpsScene/tabs/trinoMonitoringFormat.ts
  • products/data_warehouse/manifest.tsx

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.

@trunk-io

trunk-io Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

EDsCODE and others added 6 commits October 6, 2026 11:00
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@EDsCODE
EDsCODE force-pushed the eric/data-ops-trino-monitoring-backend branch from 11f2725 to dbf4c9e Compare October 6, 2026 09:13
@EDsCODE
EDsCODE force-pushed the eric/data-ops-trino-monitoring-frontend branch from 59507ad to 6fefb06 Compare October 6, 2026 09:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (1)
posthog/schema.py-5609-5609 (1)

5609-5609: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Apply alternative flags when flag is absent.

When an entry has alternativeFlags but no flag, this model accepts it. The downstream visibility helper returns true before checking alternatives, so the entry stays visible when all listed flags are off. Evaluate all configured flags, and show an entry unconditionally only when neither field has a gate.

The consumer is frontend/src/lib/utils/fileSystemImportFlags.ts Lines 5-15.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
  • Review profile: QUIET
  • Plan: Enterprise
  • Run ID: 6b6b5104-4e38-453b-ad05-1b2ecea2a00b
📥 Commits

Reviewing files that changed from the base of the PR and between 59507ad and 6fefb06.

📒 Files selected for processing (11)
  • frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx
  • frontend/src/lib/components/Search/searchLogic.tsx
  • frontend/src/lib/constants.tsx
  • frontend/src/products.tsx
  • frontend/src/queries/schema.json
  • frontend/src/queries/schema/schema-general.ts
  • frontend/src/scenes/library/libraryLogic.ts
  • frontend/src/scenes/tools/toolsLogic.ts
  • posthog/schema.py
  • products/data_warehouse/frontend/scenes/DataOpsScene/DataWarehouseScene.tsx
  • products/data_warehouse/frontend/scenes/DataOpsScene/dataWarehouseSceneLogic.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

@EDsCODE
EDsCODE removed this pull request from stack #110373 October 6, 2026 09:38
Base automatically changed from eric/data-ops-trino-monitoring-backend to eric/data-ops-trino-variant-backend October 6, 2026 09:38
@EDsCODE
EDsCODE merged commit 6fefb06 into eric/data-ops-trino-variant-backend Oct 6, 2026
241 checks passed
@EDsCODE
EDsCODE deleted the eric/data-ops-trino-monitoring-frontend branch October 6, 2026 09:39
@EDsCODE

EDsCODE commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

Combined into #110369, which carries the whole Trino Data ops variant against master. GitHub shows this PR as merged because its commits were pushed into its base branch, eric/data-ops-trino-variant-backend. Nothing from it is on master. Review it in #110369.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant