A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 4, 08:45 UTC
[CI] Add ci-fetch-log.sh helper for Buildkite job logs (#41517)
Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Michael Goin committed
May 2, 2026 at 18:23 UTC
4f7309fcc05d614b78477e2f0e24581fc09a2b3b
2 files changed
+67
-2
.buildkite/scripts/ci-fetch-log.sh
new
+55
@@ -0,0 +1,55 @@
1
+#!/bin/bash
2
+# Usage: ./ci-fetch-log.sh <buildkite_job_url> [output_file]
3
+# ./ci-fetch-log.sh <build_number> <job_uuid> [output_file]
4
+#
5
+# Downloads the raw log for a Buildkite job from the public, unauthenticated
6
+# /organizations/<org>/pipelines/<pipeline>/builds/<n>/jobs/<uuid>/download
7
+# endpoint, then strips ANSI/timestamps via ci-clean-log.sh.
8
+#
9
+# Find <build_number> and <job_uuid> via:
10
+# gh pr checks <PR> --repo vllm-project/vllm
11
+# Each failing row's URL is .../builds/<build_number>#<job_uuid>.
12
+
13
+set -euo pipefail
14
+
15
+ORG="vllm"
16
+PIPELINE="ci"
17
+
18
+usage() {
19
+ echo "Usage: $0 <buildkite_job_url> [output_file]"
20
+ echo " $0 <build_number> <job_uuid> [output_file]"
21
+ exit 1
22
+}
23
+
24
+if [ $# -lt 1 ]; then usage; fi
25
+
26
+if [[ "$1" == https://* ]]; then
27
+ BUILD=$(echo "$1" | sed -nE 's#.*/builds/([0-9]+).*#\1#p')
28
+ JOB=$(echo "$1" | grep -oE '[0-9a-f]{8}-[0-9a-f-]+' | head -n 1)
29
+ OUT="${2:-ci-${BUILD}-${JOB:0:8}.log}"
30
+else
31
+ if [ $# -lt 2 ]; then usage; fi
32
+ BUILD="$1"
33
+ JOB="$2"
34
+ OUT="${3:-ci-${BUILD}-${JOB:0:8}.log}"
35
+fi
36
+
37
+if [ -z "$BUILD" ] || [ -z "$JOB" ]; then
38
+ echo "Could not parse build number or job UUID from: $1" >&2
39
+ usage
40
+fi
41
+
42
+COOKIES=$(mktemp)
43
+trap 'rm -f "$COOKIES"' EXIT
44
+
45
+# Buildkite issues a session cookie on first hit; subsequent /download needs it.
46
+curl -fsSL -c "$COOKIES" -A "vllm-ci-fetch-log" \
47
+ "https://buildkite.com/${ORG}/${PIPELINE}/builds/${BUILD}" -o /dev/null
48
+
49
+curl -fsSL -b "$COOKIES" -A "vllm-ci-fetch-log" \
50
+ "https://buildkite.com/organizations/${ORG}/pipelines/${PIPELINE}/builds/${BUILD}/jobs/${JOB}/download" \
51
+ -o "$OUT"
52
+
53
+bash "$(dirname "$0")/ci-clean-log.sh" "$OUT"
54
+
55
+echo "$OUT"
docs/contributing/ci/failures.md
+12
-2
@@ -60,9 +60,19 @@ the failure?
60
61
## Logs Wrangling
62
63
-Download the full log file from Buildkite locally.
63
+Download a job's log (no Buildkite login required):
64
65
-Strip timestamps and colorization:
65
+[.buildkite/scripts/ci-fetch-log.sh](../../../.buildkite/scripts/ci-fetch-log.sh)
66
+
67
+```bash
68
+# Find the failing job. Each row's URL is .../builds/<N>#<job_uuid>:
69
+gh pr checks <PR> --repo vllm-project/vllm
70
+
71
+# Download + strip timestamps/ANSI in one step:
72
+.buildkite/scripts/ci-fetch-log.sh "https://buildkite.com/vllm/ci/builds/<N>#<job_uuid>"
73
+```
74
+
75
+To clean an already-downloaded log:
76
77
[.buildkite/scripts/ci-clean-log.sh](../../../.buildkite/scripts/ci-clean-log.sh)
78