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 3, 11:45 UTC
Improve logging when docs build is skipped (#42929)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
May 18, 2026 at 15:33 UTC
c1f7854342d1e80f7f2406524d242b8ee5476d6d
2 files changed
+42
-38
.readthedocs.yaml
+1
-38
@@ -9,44 +9,7 @@ build:
9
python: "3.12"
10
jobs:
11
post_checkout:
12
- - |
13
- if [ "$READTHEDOCS_VERSION_TYPE" = "external" ]; then
14
- MAX_WAIT=300
15
- INTERVAL=60
16
- ELAPSED=0
17
- while :; do
18
- RAW=$(curl -sS -w "\n%{http_code}" "https://api.github.com/repos/vllm-project/vllm/commits/${READTHEDOCS_GIT_COMMIT_HASH}/check-runs?check_name=pre-run-check&filter=latest")
19
- HTTP_CODE=$(printf %s "$RAW" | tail -n1)
20
- BODY=$(printf %s "$RAW" | head -n -1)
21
- if [ "$HTTP_CODE" != "200" ]; then
22
- echo "GitHub API returned HTTP $HTTP_CODE (likely rate-limited); skipping pre-run-check gate."
23
- break
24
- fi
25
- STATUS=$(printf %s "$BODY" | python3 -c "import sys, json; r=json.load(sys.stdin).get(\"check_runs\",[]); print((r[0].get(\"status\") or \"\") if r else \"none\")")
26
- CONCLUSION=$(printf %s "$BODY" | python3 -c "import sys, json; r=json.load(sys.stdin).get(\"check_runs\",[]); print((r[0].get(\"conclusion\") or \"\") if r else \"\")")
27
- if [ "$STATUS" = "none" ]; then
28
- echo "no pre-run-check found for this commit; skipping gate."
29
- break
30
- fi
31
- if [ -n "$CONCLUSION" ]; then
32
- echo "pre-run-check conclusion: $CONCLUSION"
33
- if [ "$CONCLUSION" = "failure" ] || [ "$CONCLUSION" = "cancelled" ] || [ "$CONCLUSION" = "timed_out" ]; then
34
- echo "pre-run-check did not pass; failing docs build."
35
- exit 1
36
- fi
37
- break
38
- fi
39
- if [ "$ELAPSED" -ge "$MAX_WAIT" ]; then
40
- echo "pre-run-check status=$STATUS after ${MAX_WAIT}s; skipping gate."
41
- break
42
- fi
43
- echo "pre-run-check status=$STATUS; waiting ${INTERVAL}s..."
44
- sleep "$INTERVAL"
45
- ELAPSED=$((ELAPSED + INTERVAL))
46
- done
47
- else
48
- echo "Not a PR build (version type=$READTHEDOCS_VERSION_TYPE); skipping pre-run-check gate."
49
- fi
12
+ - bash docs/pre_run_check.sh
13
- git fetch origin main --unshallow --no-tags --filter=blob:none || true
14
pre_create_environment:
15
- pip install uv
docs/pre_run_check.sh
new
+41
@@ -0,0 +1,41 @@
1
+if [ "$READTHEDOCS_VERSION_TYPE" = "external" ]; then
2
+ MAX_WAIT=300
3
+ INTERVAL=60
4
+ ELAPSED=0
5
+ while :; do
6
+ RAW=$(curl -sS -w "\n%{http_code}" "https://api.github.com/repos/vllm-project/vllm/commits/${READTHEDOCS_GIT_COMMIT_HASH}/check-runs?check_name=pre-run-check&filter=latest")
7
+ HTTP_CODE=$(printf %s "$RAW" | tail -n1)
8
+ BODY=$(printf %s "$RAW" | sed '$d')
9
+ if [ "$HTTP_CODE" != "200" ]; then
10
+ echo "GitHub API returned HTTP $HTTP_CODE (likely rate-limited); skipping pre-run-check gate."
11
+ break
12
+ fi
13
+ STATUS=$(printf %s "$BODY" | python3 -c "import sys, json; r=json.load(sys.stdin).get(\"check_runs\",[]); print((r[0].get(\"status\") or \"\") if r else \"none\")")
14
+ CONCLUSION=$(printf %s "$BODY" | python3 -c "import sys, json; r=json.load(sys.stdin).get(\"check_runs\",[]); print((r[0].get(\"conclusion\") or \"\") if r else \"\")")
15
+ CHECK_URL=$(printf %s "$BODY" | python3 -c "import sys, json; r=json.load(sys.stdin).get(\"check_runs\",[]); print((r[0].get(\"html_url\") or \"\") if r else \"\")")
16
+ if [ "$STATUS" = "none" ]; then
17
+ echo "no pre-run-check found for this commit; skipping gate."
18
+ break
19
+ fi
20
+ if [ -n "$CONCLUSION" ]; then
21
+ echo "pre-run-check conclusion: $CONCLUSION"
22
+ if [ "$CONCLUSION" = "failure" ] || [ "$CONCLUSION" = "cancelled" ] || [ "$CONCLUSION" = "timed_out" ]; then
23
+ echo "pre-run-check did not pass; skipping docs build."
24
+ if [ -n "$CHECK_URL" ]; then
25
+ echo "pre-run-check failure reason: $CHECK_URL"
26
+ fi
27
+ exit 1
28
+ fi
29
+ break
30
+ fi
31
+ if [ "$ELAPSED" -ge "$MAX_WAIT" ]; then
32
+ echo "pre-run-check status=$STATUS after ${MAX_WAIT}s; skipping gate."
33
+ break
34
+ fi
35
+ echo "pre-run-check status=$STATUS; waiting ${INTERVAL}s..."
36
+ sleep "$INTERVAL"
37
+ ELAPSED=$((ELAPSED + INTERVAL))
38
+ done
39
+else
40
+ echo "Not a PR build (version type=$READTHEDOCS_VERSION_TYPE); skipping pre-run-check gate."
41
+fi
\ No newline at end of file