@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 03f03f9630
Fork 0

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 2, 12:15 UTC

Refactor output filename handling in ci-fetch-log.sh (#43901)

Signed-off-by: Michael Goin <mgoin64@gmail.com>

Michael Goin committed May 28, 2026 at 17:20 UTC 03f03f9630396da9c7d6675589127ade4a8f283f
1 file changed +21 -2
.buildkite/scripts/ci-fetch-log.sh
+21 -2
@@ -9,6 +9,13 @@
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 +# Default output path: ci-<build>-<uuid_first_13_chars>.log (e.g.
14 +# ci-68478-019e6b07-daae.log). Jobs in the same build share the UUID's
15 +# first 8 chars, so the second segment is needed for uniqueness when
16 +# fetching multiple jobs in parallel. The script refuses to overwrite an
17 +# existing output file; pass an explicit path or set CI_FETCH_LOG_FORCE=1
18 +# to override.
19
20 set -euo pipefail
21
@@ -26,12 +33,12 @@ if [ $# -lt 1 ]; then usage; fi
33 if [[ "$1" == https://* ]]; then
34 BUILD=$(echo "$1" | sed -nE 's#.*/builds/([0-9]+).*#\1#p')
35 JOB=$(echo "$1" | grep -oE '[0-9a-f]{8}-[0-9a-f-]+' | head -n 1)
29 - OUT="${2:-ci-${BUILD}-${JOB:0:8}.log}"
36 + OUT="${2:-}"
37 else
38 if [ $# -lt 2 ]; then usage; fi
39 BUILD="$1"
40 JOB="$2"
34 - OUT="${3:-ci-${BUILD}-${JOB:0:8}.log}"
41 + OUT="${3:-}"
42 fi
43
44 if [ -z "$BUILD" ] || [ -z "$JOB" ]; then
@@ -39,6 +46,18 @@ if [ -z "$BUILD" ] || [ -z "$JOB" ]; then
46 usage
47 fi
48
49 +# Jobs in the same build share the UUID's first segment, so include the
50 +# second segment (chars 9-13, e.g. "019e6b07-daae") to keep default filenames
51 +# unique when fetching multiple jobs from one build in parallel.
52 +if [ -z "$OUT" ]; then
53 + OUT="ci-${BUILD}-${JOB:0:13}.log"
54 +fi
55 +
56 +if [ -e "$OUT" ] && [ -z "${CI_FETCH_LOG_FORCE:-}" ]; then
57 + echo "Refusing to overwrite existing $OUT (set CI_FETCH_LOG_FORCE=1 or pass an explicit output path)." >&2
58 + exit 1
59 +fi
60 +
61 COOKIES=$(mktemp)
62 trap 'rm -f "$COOKIES"' EXIT
63