Commit e022736
authored
[CRCR] Replace Flaky Jobs card with Timeout Rate and align Pass Rate colors with L3 criteria (#8421)
## Summary
Two changes to the CRCR per-repo dashboard page (`/crcr/{org}/{repo}`),
aligning stat card thresholds with the L3 promotion criteria proposed in
[pytorch/rfcs#102](pytorch/rfcs#102).
### 1. Replace Flaky Jobs card → Timeout Rate
**ClickHouse query** (`crcr_backend_summary/query.sql`):
- Removed the complex flaky-job subquery (correlated subquery scanning
the table twice)
- Added `timeout_rate = timed_out / total_jobs`
**Frontend card**:
- Shows percentage (e.g., `0.0%`, `1.2%`)
- Sub-text: `X timed out / Y jobs`
- Color: green (0%), orange (>0% but <10%), red (≥10% — exceeds L3
threshold)
### 2. Align Pass Rate color thresholds
Updated to match L3 criteria (`job pass rate > 90%`):
- **Green**: 100%
- **Orange**: 90–99.9% (meets L3)
- **Red**: < 90% (below L3)
Previously: ≥95% green, ≥80% orange, <80% red.
## Context
The L3 criteria in
[pytorch/rfcs#102](pytorch/rfcs#102) defines:
- **Timeout rate < 10%** as an infrastructure reliability signal
- **Job pass rate > 90%** as a test quality signal
These cards make L3 readiness directly visible on the per-repo
dashboard.
## Test plan
- [ ] Verify `crcr_backend_summary` query returns `timeout_rate`
correctly
- [ ] Verify Timeout Rate card renders with proper color coding
- [ ] Verify Pass Rate card shows red when < 90%, orange when 90–99.9%,
green at 100%1 parent 51bd043 commit e022736
2 files changed
Lines changed: 18 additions & 25 deletions
Lines changed: 5 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
28 | 15 | | |
29 | 16 | | |
30 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
| |||
0 commit comments