Repository navigation
Conversation
Every CI query (the CI page, the pull request sheet's runs, the ci_runs MCP tool) reads the projections instead of raw traces' Map columns. The week-long default on a Maple-sized org reads 10 MB instead of 1.3 GB. Attempt and pull request come back as numbers, so the string parsing goes. The query tests move to ClickHouse: the e2e runs every builder on seeded runs and jobs. A self-hosted cluster without migration 0047 gets an explicit apply-the-schema answer from the MCP tool.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Maple review🟢 Confidence 10/10 · safe to merge Moves every CI read (analytics page, PR sheet,
Before merge
Production impactTelemetry this change adds and removes (16)
What was checked
|
|
Merge order for the deploy items above: merge #1718 first and let its prd deploy create and fill |
Real-data check (Maple's own CI, 2026-10-14..22)Exported the org's 333k
This local raw table holds only CI spans; prod's also holds every other service's, so prod reads more (205 MB for one queue query, 16 s cold for a 30-day scan). Real rows compress to 91 B per run and 52 B per job: 2.3 MB for nine days of the org's CI. Parity on the real data: all 9 reads return identical rows. The one visible difference, queue p95 (381 s vs 400 s), is |
What
Every CI read moves from raw
tracestoci_runs/ci_jobs: the CI page (totals, series, workflows, jobs, red streaks, runs list), the pull request sheet's CI runs and theci_runsMCP tool. Attempt and pull request come back as numbers, so the string parsing in the service goes.Numbers
Same synthetic dataset as the previous PR. One page load of the CI tab (today's 11 reads, the previous period's totals approximated by the current one):
tracesTimes are isolated server time on the critical path of the three waves; prod adds cold reads and up to seven concurrent queries on top, which is where the 4 to 15 s tails came from. Merging the page's reads into fewer scans (GROUPING SETS) read less but lengthened the critical path, so the reads stay separate.
The shipped builders, run through
apps/api/scripts/bench-suites/ci.tson the same data: every 30-day read is 2 to 12 ms and under 6 MB.Parity
All 54 overlapping raw-vs-rollup cases (3 orgs x 7d/30d x 9 queries) return identical counts, sums, latest results, run lists, PR filters, streaks and failed jobs. Only sampled
quantile()values drift, as they do between two raw runs.Self-hosted ClickHouse
A cluster that has not applied migration 0047 has no CI tables. The MCP tool answers with an explicit "apply the schema from its ClickHouse settings page" (
McpUnavailableError); the CI page shows the classified warehouse config error, as funnels do forproduct_events.Verification
ci-runs.clickhouse.e2e.test.tsnow also runs every CI builder on seeded runs and jobs: totals, failures vs cancellations, series, per-workflow latest result, jobs that ran (zero-length and skipped excluded) with reruns and queue time, newest-first paging after a cursor, the PR filter, the red streak and failed jobs. A mutation in the expected order fails it.ci-runs.test.tsmoved to that e2e.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Stack: #1718 (tables) → #1719 (reads) → #1720 (one-year range)
Stack: #1718 (tables) → #1719 (reads) → #1720 (one-year range)
🤖 Generated with Claude Code
Summary by CodeRabbit