Skip to content

Commit cc8256a

Browse files
committed
Add recent build tracker for jobs
1 parent 6641870 commit cc8256a

File tree

7 files changed

+580
-0
lines changed

7 files changed

+580
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"params": {
3+
"repo": "String",
4+
"pipelineName": "String",
5+
"startTime": "DateTime64(3)",
6+
"stopTime": "DateTime64(3)",
7+
"jobGroups": "Array(String)"
8+
},
9+
"tests": [
10+
{
11+
"repo": "https://github.com/vllm-project/vllm.git",
12+
"pipelineName": "CI",
13+
"startTime": "2025-11-17T00:00:00.000",
14+
"stopTime": "2025-11-24T00:00:00.000",
15+
"jobGroups": ["amd", "torch_nightly", "main"]
16+
}
17+
]
18+
}
19+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
-- vLLM job list for build exploration
2+
-- Returns a list of all jobs in the time period with basic stats
3+
-- Used for the job selector in the JobBuildsPanel component
4+
-- Only tracks main branch to focus on production CI
5+
6+
SELECT
7+
tupleElement(job, 'name') AS job_name,
8+
COUNT(*) AS total_runs,
9+
countIf(lowerUTF8(tupleElement(job, 'state')) IN ('passed', 'finished', 'success')) AS passed_count,
10+
countIf(lowerUTF8(tupleElement(job, 'state')) = 'failed') AS failed_count,
11+
max(tupleElement(job, 'finished_at')) AS last_run_at
12+
FROM vllm.vllm_buildkite_jobs
13+
WHERE
14+
tupleElement(pipeline, 'repository') = {repo: String}
15+
AND tupleElement(pipeline, 'name') = {pipelineName: String}
16+
AND tupleElement(build, 'branch') = 'main'
17+
AND tupleElement(job, 'finished_at') IS NOT NULL
18+
AND tupleElement(job, 'finished_at') >= {startTime: DateTime64(3)}
19+
AND tupleElement(job, 'finished_at') < {stopTime: DateTime64(3)}
20+
-- Job group filtering: AMD, Torch Nightly, or Main
21+
AND (
22+
(
23+
has({jobGroups: Array(String)}, 'amd')
24+
AND positionCaseInsensitive(tupleElement(job, 'name'), 'AMD') > 0
25+
)
26+
OR (
27+
has({jobGroups: Array(String)}, 'torch_nightly')
28+
AND positionCaseInsensitive(tupleElement(job, 'name'), 'Torch Nightly') > 0
29+
)
30+
OR (
31+
has({jobGroups: Array(String)}, 'main')
32+
AND positionCaseInsensitive(tupleElement(job, 'name'), 'AMD') = 0
33+
AND positionCaseInsensitive(tupleElement(job, 'name'), 'Torch Nightly') = 0
34+
)
35+
)
36+
GROUP BY job_name
37+
ORDER BY last_run_at DESC, total_runs DESC
38+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"params": {
3+
"repo": "String",
4+
"pipelineName": "String",
5+
"jobName": "String",
6+
"startTime": "DateTime64(3)",
7+
"stopTime": "DateTime64(3)"
8+
},
9+
"tests": [
10+
{
11+
"repo": "https://github.com/vllm-project/vllm.git",
12+
"pipelineName": "CI",
13+
"jobName": "Test Example Job",
14+
"startTime": "2025-11-17T00:00:00.000",
15+
"stopTime": "2025-11-24T00:00:00.000"
16+
}
17+
]
18+
}
19+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
-- vLLM recent builds for a specific job
2+
-- Returns all builds within the time range for a given job name
3+
-- Shows build details: number, state, duration, timestamps, etc.
4+
-- Only tracks main branch
5+
6+
WITH job_builds AS (
7+
SELECT
8+
toUInt32(tupleElement(build, 'number')) AS build_number,
9+
tupleElement(build, 'id') AS build_id,
10+
tupleElement(build, 'state') AS build_state,
11+
tupleElement(build, 'web_url') AS build_url,
12+
tupleElement(build, 'started_at') AS build_started_at,
13+
tupleElement(build, 'finished_at') AS build_finished_at,
14+
tupleElement(build, 'commit') AS commit,
15+
tupleElement(build, 'message') AS commit_message,
16+
tupleElement(job, 'name') AS job_name,
17+
tupleElement(job, 'state') AS job_state,
18+
tupleElement(job, 'soft_failed') AS soft_failed,
19+
tupleElement(job, 'started_at') AS job_started_at,
20+
tupleElement(job, 'finished_at') AS job_finished_at,
21+
tupleElement(job, 'web_url') AS job_url,
22+
-- Calculate duration in hours
23+
dateDiff(
24+
'second',
25+
tupleElement(job, 'started_at'),
26+
tupleElement(job, 'finished_at')
27+
) / 3600.0 AS duration_hours
28+
FROM vllm.vllm_buildkite_jobs
29+
WHERE
30+
tupleElement(pipeline, 'repository') = {repo: String}
31+
AND tupleElement(pipeline, 'name') = {pipelineName: String}
32+
AND tupleElement(build, 'branch') = 'main'
33+
AND tupleElement(job, 'name') = {jobName: String}
34+
AND tupleElement(job, 'finished_at') IS NOT NULL
35+
AND tupleElement(job, 'finished_at') >= {startTime: DateTime64(3)}
36+
AND tupleElement(job, 'finished_at') < {stopTime: DateTime64(3)}
37+
)
38+
39+
SELECT
40+
build_number,
41+
build_id,
42+
build_state,
43+
build_url,
44+
build_started_at,
45+
build_finished_at,
46+
commit,
47+
commit_message,
48+
job_name,
49+
job_state,
50+
soft_failed,
51+
job_started_at,
52+
job_finished_at,
53+
job_url,
54+
duration_hours
55+
FROM job_builds
56+
ORDER BY job_finished_at DESC
57+

0 commit comments

Comments
 (0)