Commit 5f99905
authored
[CRCR] Base relay health on last 5 PR pass rates (#8454)
## Summary
Changes the CRCR Relay Health card on the summary page
(`hud.pytorch.org/crcr`) to evaluate health based on whether the **last
5 PR-level crcr-test runs all passed**, instead of the aggregate pass
rate over the entire time window.
### Before
- Health = `total_successes / total_runs` across all jobs in the time
window
- A high historical pass rate could mask recent regressions
### After
- Health = "Healthy" only if all 5 most recent PR runs have 100% pass
rate
- "Degraded" if any of the last 5 PRs had a failure
- Subtitle shows `X/5 recent PRs passed` for quick context
### Changes
- New `crcr_health_last_prs` ClickHouse query: fetches the 5 most recent
distinct PRs for `pytorch/crcr-test`, computes per-PR pass rates with
expected-outcome handling (`xfail`, `xcancel`, `xtimeout`)
- Updated `CrcrTestHealthCard` component to use the new per-PR health
data instead of the aggregate metrics
Fixes #8424
## Test plan
- Visit `/crcr` — Health card should show "Healthy" only when all 5
recent PRs passed
- If any of the last 5 PRs had unexpected failures, card should show
"Degraded"
- Subtitle displays `X/5 recent PRs passed · pytorch/crcr-test`1 parent 50a4098 commit 5f99905
3 files changed
Lines changed: 73 additions & 11 deletions
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 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 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
441 | 449 | | |
442 | 450 | | |
443 | 451 | | |
444 | | - | |
| 452 | + | |
445 | 453 | | |
446 | | - | |
| 454 | + | |
447 | 455 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
453 | 461 | | |
454 | 462 | | |
455 | 463 | | |
| |||
474 | 482 | | |
475 | 483 | | |
476 | 484 | | |
477 | | - | |
478 | | - | |
| 485 | + | |
479 | 486 | | |
480 | 487 | | |
481 | 488 | | |
| |||
507 | 514 | | |
508 | 515 | | |
509 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
510 | 526 | | |
511 | 527 | | |
512 | 528 | | |
| |||
597 | 613 | | |
598 | 614 | | |
599 | 615 | | |
600 | | - | |
| 616 | + | |
601 | 617 | | |
602 | 618 | | |
603 | 619 | | |
| |||
652 | 668 | | |
653 | 669 | | |
654 | 670 | | |
| 671 | + | |
655 | 672 | | |
656 | 673 | | |
657 | 674 | | |
| |||
661 | 678 | | |
662 | 679 | | |
663 | 680 | | |
664 | | - | |
| 681 | + | |
665 | 682 | | |
666 | 683 | | |
667 | 684 | | |
| |||
0 commit comments