Hive Hive
Sign in

Faster flaky-alert validation on the server under load

Metadata
Source
GitHub
Version
server@1.226.1
Domains
Published
Jul 02, 2026 · 19:53 UTC
Repository
tuist/tuist
Update

The flaky-alert validation logic on the Tuist server now uses a dedicated ClickHouse materialized view (test_case_runs_validated_on_branch_mv) instead of scanning the raw test_case_runs table for every evaluation. The previous query was the single most CPU-expensive ClickHouse query in production: on busy projects it read millions of rows per evaluation and ran around 1.5s each under contention (compared to ~100ms when idle), contributing to sustained ClickHouse CPU saturation. Semantics are unchanged, but a successful, non-flaky run on the default branch now validates via a primary-key point lookup on a small marker table, making the validation gate that filters brand-new or PR-only tests out of automatic quarantine faster and more reliable under load.