Commit 4baaadd
authored
[CRCR] Treat expected non-success outcomes (xfail/xcancel/xtimeout) as successes in pass rate (#8376)
## Summary
Fixes the CRCR pass rate calculation to correctly handle **expected
non-success outcomes** in health-probe repos like `pytorch/crcr-test`.
The `crcr-test` repo uses jobs with `x`-prefixed names (`xfail`,
`xcancel`, `xtimeout`) that intentionally end in failure, cancellation,
or timeout to test the relay's handling of these outcomes (see
[pytorch/crcr-test#19](pytorch/crcr-test#19)).
These expected results were being counted as failures in the ClickHouse
pass rate queries, causing `pytorch/crcr-test` to show a degraded health
status even though the relay is functioning correctly.
### Changes
Three ClickHouse queries updated with the same logic:
1. **`crcr_summary`** — CRCR summary page (`/crcr`)
2. **`crcr_success_rate`** — CRCR metrics page (`/crcr/metrics`)
3. **`crcr_backend_summary`** — per-repo dashboard
(`/crcr/[org]/[repo]`)
For each query:
- **Successes**: now includes jobs where `job_name LIKE '%xfail%'`,
`'%xcancel%'`, or `'%xtimeout%'`
- **Failures**: excludes `xfail` jobs
- **Timed out**: excludes `xtimeout` jobs
This uses the `job_name` convention established in
[pytorch/crcr-test#19](pytorch/crcr-test#19) —
jobs prefixed with `x` are intentional/expected outcomes, not bugs.
Fixes #8306
## Test plan
- [ ] Verify CRCR summary page shows improved pass rate for
`pytorch/crcr-test`
- [ ] Verify metrics page charts reflect corrected rates
- [ ] Verify per-repo dashboard for `pytorch/crcr-test` shows accurate
stats1 parent 30f7d96 commit 4baaadd
3 files changed
Lines changed: 81 additions & 9 deletions
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
5 | 29 | | |
6 | 30 | | |
7 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
7 | 31 | | |
8 | 32 | | |
9 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
7 | 31 | | |
8 | 32 | | |
9 | 33 | | |
| |||
0 commit comments