Skip to content

Commit 584732c

Browse files
committed
[HUD] Show unstable-marked jobs on the reliability page
The 'Unstable jobs' panel only matched the dedicated 'unstable' workflow (green scaffolding), so jobs marked unstable via 'UNSTABLE ...' issues -- which keep running on main with an ', unstable' config marker -- were never shown. Add an unstableOnly toggle to master_commit_red_jobs: 0 keeps the existing workflow-scoped behavior (verified byte-identical); 1 flips the filter to show the union of the dedicated 'unstable' workflow and any job marked unstable on main (workflow_run- chained jobs excluded, as in normal mode). Point the panel at it with unstableOnly=1. Reuses the shared query instead of a fork.
1 parent be52519 commit 584732c

3 files changed

Lines changed: 50 additions & 10 deletions

File tree

torchci/clickhouse_queries/master_commit_red_jobs/params.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,31 @@
22
"params": {
33
"startTime": "DateTime64(3)",
44
"stopTime": "DateTime64(3)",
5-
"workflowNames": "Array(String)"
5+
"workflowNames": "Array(String)",
6+
"unstableOnly": "UInt8"
7+
},
8+
"defaults": {
9+
"workflowNames": [],
10+
"unstableOnly": 0
611
},
712
"tests": [
813
{
914
"startTime": "2025-03-18T21:09:47.987",
1015
"stopTime": "2025-03-25T21:09:47.987",
11-
"workflowNames": ["pull"]
16+
"workflowNames": ["pull"],
17+
"unstableOnly": 0
18+
},
19+
{
20+
"startTime": "2025-03-18T21:09:47.987",
21+
"stopTime": "2025-03-25T21:09:47.987",
22+
"workflowNames": ["lint", "pull", "trunk"],
23+
"unstableOnly": 0
1224
},
1325
{
1426
"startTime": "2025-03-18T21:09:47.987",
1527
"stopTime": "2025-03-25T21:09:47.987",
16-
"workflowNames": ["lint", "pull", "trunk"]
28+
"workflowNames": [],
29+
"unstableOnly": 1
1730
}
1831
]
19-
}
32+
}

torchci/clickhouse_queries/master_commit_red_jobs/query.sql

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
-- This query is used to show failures on https://hud.pytorch.org/reliability/pytorch/pytorch
2+
-- {unstableOnly}=0 backs the workflow-scoped panels; {unstableOnly}=1 backs the
3+
-- "Unstable jobs" panel (see the WHERE branch below).
24
WITH all_jobs AS (
35
SELECT
46
p.head_commit. 'timestamp' AS time,
@@ -41,9 +43,27 @@ WITH all_jobs AS (
4143
AND j.name != 'generate-test-matrix'
4244
AND j.name NOT LIKE '%rerun_disabled_tests%'
4345
AND j.name NOT LIKE '%filter%'
44-
AND j.name NOT LIKE '%unstable%'
4546
AND j.name LIKE '%/%'
46-
AND has({workflowNames: Array(String) }, lower(j.workflow_name))
47+
-- Normal mode ({unstableOnly}=0): exclude unstable jobs, keep the requested
48+
-- workflows. Unstable mode ({unstableOnly}=1): the dedicated "unstable"
49+
-- workflow, plus any job marked unstable (including scheduled/nightly);
50+
-- workflowNames is unused in that mode. Both modes drop workflow_run-chained
51+
-- jobs via the shared line below.
52+
AND (
53+
(
54+
{unstableOnly: UInt8} = 0
55+
AND j.name NOT LIKE '%unstable%'
56+
AND has({workflowNames: Array(String) }, lower(j.workflow_name))
57+
)
58+
OR
59+
(
60+
{unstableOnly: UInt8} = 1
61+
AND (
62+
lower(j.workflow_name) = 'unstable'
63+
OR j.name LIKE '%unstable%'
64+
)
65+
)
66+
)
4767
AND j.workflow_event != 'workflow_run' -- Filter out worflow_run-triggered jobs, which have nothing to do with the SHA
4868
AND p.ref = 'refs/heads/main'
4969
AND p.repository. 'owner'.'name' = 'pytorch'

torchci/pages/reliability/[repoOwner]/[repoName]/[[...page]].tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,20 @@ export default function Page() {
573573
</Grid>
574574

575575
<Grid size={{ xs: 6 }} height={ROW_HEIGHT}>
576+
{/*
577+
Unstable jobs to watch: union of the dedicated "unstable" workflow and
578+
any job marked unstable on main (any trigger; workflow_run-chained jobs
579+
excluded). Same query as the other panels with unstableOnly=1, which
580+
flips its unstable filter; workflowNames is unused in that mode.
581+
*/}
576582
<GroupReliabilityPanel
577583
title={"Unstable jobs"}
584+
subtitle={
585+
UNSTABLE_WORKFLOWS.join(", ") +
586+
" workflow + main jobs marked unstable"
587+
}
578588
queryName={queryName}
579-
queryParams={{
580-
workflowNames: UNSTABLE_WORKFLOWS,
581-
...queryParams,
582-
}}
589+
queryParams={{ unstableOnly: 1, ...queryParams }}
583590
metricName={metricName}
584591
metricHeaderName={metricHeaderName}
585592
filter={filter}

0 commit comments

Comments
 (0)