Skip to content

Commit 11bc878

Browse files
authored
[CRCR] Add nightly results view to per-repo dashboard (#8441)
## Summary - Adds `?event=nightly` query parameter support to the per-repo CRCR dashboard page (`/crcr/{org}/{repo}`) - When `event=nightly`, the page shows nightly CI results grouped by SHA with Time/SHA/Commit columns (no PR number or author) - The CRCR summary page's nightly tab now links repos to `/crcr/{org}/{repo}?event=nightly` so navigation is context-aware - Creates a new `crcr_nightly_dashboard` ClickHouse query that filters by `event_type = 'nightly'` and deduplicates by `max(run_attempt)` per `run_id + job_name` ### Navigation flow | Source | Link Target | |--------|-------------| | CRCR Summary → Pull Requests tab → click repo | `/crcr/{org}/{repo}` (default, PR results) | | CRCR Summary → Nightly tab → click repo | `/crcr/{org}/{repo}?event=nightly` (nightly results) | ### Mockup - [Nightly per-repo mockup](https://subinz1.github.io/CRCR/oot-hud-mockup-crcr-nightly.html) - [CRCR Summary mockup](https://subinz1.github.io/CRCR/oot-hud-mockup-crcr-summary.html) ## Test plan - [ ] Visit `/crcr/{org}/{repo}` — should show PR-based results (default behavior unchanged) - [ ] Visit `/crcr/{org}/{repo}?event=nightly` — should show nightly results grouped by SHA - [ ] CRCR summary nightly tab repo links navigate to `?event=nightly` - [ ] Nightly view hides PR/Author columns and stat cards - [ ] Time range selector works for nightly view - [ ] Empty state displays correctly when no nightly data exists
1 parent a575ab9 commit 11bc878

4 files changed

Lines changed: 450 additions & 28 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"params": {
3+
"repo": "String",
4+
"days": "UInt64"
5+
},
6+
"tests": [
7+
{
8+
"repo": "<company>/<repo>",
9+
"days": "7"
10+
}
11+
]
12+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
SELECT
2+
upstream_repo,
3+
pytorch_head_sha,
4+
workflow_name,
5+
job_name,
6+
check_run_id,
7+
run_id,
8+
run_attempt,
9+
status,
10+
conclusion,
11+
started_at,
12+
completed_at,
13+
duration_seconds,
14+
total_tests,
15+
passed_tests,
16+
failed_tests,
17+
skipped_tests,
18+
workflow_run_url,
19+
artifact_url,
20+
queue_time,
21+
execution_time
22+
FROM
23+
default.crcr_workflow_job FINAL
24+
WHERE
25+
downstream_repo = {repo: String}
26+
AND started_at > now() - INTERVAL {days: UInt64} DAY
27+
AND event_type = 'nightly'
28+
AND (run_id, job_name, run_attempt) IN (
29+
SELECT
30+
run_id,
31+
job_name,
32+
max(run_attempt) AS max_attempt
33+
FROM default.crcr_workflow_job FINAL
34+
WHERE
35+
downstream_repo = {repo: String}
36+
AND started_at > now() - INTERVAL {days: UInt64} DAY
37+
AND event_type = 'nightly'
38+
GROUP BY run_id, job_name
39+
)
40+
ORDER BY
41+
started_at DESC
42+
LIMIT 500

0 commit comments

Comments
 (0)