Commit d9dff49
authored
[HUD] Restrict 'Hide non-viable-strict jobs' to pytorch/pytorch (#8150)
## Summary
The "Hide non-viable-strict jobs" setting was [defaulted to enabled in
#8146](#8146). However, the
viable/strict concept — and the `VIABLE_STRICT_BLOCKING_JOBS` map the
filter relies on (`lib/JobClassifierUtil.ts`) — only exists for
`pytorch/pytorch`. On any other repo that map is empty, so with the
setting now on by default, opening the HUD for a non-pytorch repo would
hide **every** column.
This PR makes the setting pytorch/pytorch-only:
- **Grays out / disables the checkbox** for non-pytorch/pytorch repos
(with a tooltip explaining why), via a new `disabled`/`title` prop on
`CheckBoxSelector`.
- **Makes the filter a no-op** for non-pytorch/pytorch repos in
`GroupedHudTable`, so even a value left in `localStorage` from visiting
pytorch/pytorch won't hide anything elsewhere.
- Adds an `isPyTorchPyTorchRepo(params)` helper in `lib/types.ts`
(alongside the other `HudParams` helpers) and uses it for the gating,
including the existing `isPyTorchMain` check.
## Test plan
- On `pytorch/pytorch`: checkbox is enabled and filtering behaves as
before.
- On any other repo (e.g. `pytorch/vision`): checkbox is grayed out /
not clickable, and no columns are hidden regardless of the stored
setting.1 parent b9b7ab8 commit d9dff49
3 files changed
Lines changed: 39 additions & 8 deletions
File tree
- torchci
- components/common
- lib
- pages/hud/[repoOwner]/[repoName]/[branch]
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
22 | | - | |
| 30 | + | |
23 | 31 | | |
| 32 | + | |
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| 39 | + | |
30 | 40 | | |
31 | | - | |
| 41 | + | |
32 | 42 | | |
33 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
34 | 50 | | |
35 | 51 | | |
36 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
402 | | - | |
403 | | - | |
404 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
| |||
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
453 | 462 | | |
454 | 463 | | |
455 | 464 | | |
| |||
855 | 864 | | |
856 | 865 | | |
857 | 866 | | |
858 | | - | |
859 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
860 | 871 | | |
861 | 872 | | |
862 | 873 | | |
| |||
0 commit comments