Skip to content

Commit a439748

Browse files
authored
[CRCR] Add nightly tab to CI summary page (#8377)
## Summary Adds event-type tabs (**Pull Requests** | **Nightly**) to the CRCR CI summary page (`hud.pytorch.org/crcr`), enabling visibility into nightly CI results from downstream repos alongside existing PR CI data. ### Changes - **New ClickHouse query `crcr_nightly_summary`**: Aggregates nightly CI results per downstream repo, filtering on `event_type = 'nightly'`, including the latest tested SHA - **Filter PR data**: Adds `AND pr_number > 0` to `crcr_summary` query to prevent nightly rows from appearing in the PR tab - **Nightly tab UI**: Tab-based navigation with repo count badges, a nightly results table with SHA links, and an empty state when no nightly data exists yet ### Dependencies - Depends on #8353 for the `event_type` column in `crcr_workflow_job` ClickHouse schema ### Mockup **Design**: https://subinz1.github.io/CRCR/mockups/crcr-summary-nightly-design.html ### Test plan - [ ] Verify PR tab displays current CRCR data as before - [ ] Verify Nightly tab shows empty state (no nightly data reported yet) - [ ] Once #8353 is deployed, verify nightly results appear in the Nightly tab - [ ] Verify tab count badges update correctly - [ ] Verify SHA links point to correct pytorch/pytorch commits
1 parent 1b7faf9 commit a439748

3 files changed

Lines changed: 308 additions & 42 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"params": {
3+
"days": "UInt64"
4+
},
5+
"tests": [
6+
{
7+
"days": "7"
8+
}
9+
]
10+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
SELECT
2+
downstream_repo AS repo,
3+
anyLast(downstream_repo_level) AS downstream_repo_level,
4+
countIf(conclusion = 'success') AS successes,
5+
countIf(conclusion = 'failure') AS failures,
6+
countIf(conclusion = 'timed_out') AS timed_out,
7+
count() AS total,
8+
if(total > 0, successes / total, 0) AS pass_rate,
9+
avg(duration_seconds) AS avg_duration_s,
10+
max(started_at) AS last_run,
11+
argMax(pytorch_head_sha, started_at) AS latest_sha
12+
FROM
13+
default.crcr_workflow_job FINAL
14+
WHERE
15+
started_at > now() - INTERVAL {days: UInt64} DAY
16+
AND status = 'completed'
17+
AND event_type = 'nightly'
18+
GROUP BY
19+
repo
20+
ORDER BY
21+
pass_rate ASC

0 commit comments

Comments
 (0)