Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
container:
image: lmsysorg/sglang:v0.5.18-cu130 # we lock to this version to avoid repeated docker pull
options: --gpus all --shm-size=2g --rm -v /dev/shm --privileged --pid=host
# The self-hosted runner exports HTTP(S)_PROXY into the container but no
# longer a NO_PROXY, so local requests (sglang's own warmup to 127.0.0.1)
# went through the proxy and got 502. Keep loopback off the proxy here
# instead of relying on the runner's environment. (Actions env keys are
# case-insensitive, so no separate no_proxy; Python reads either case.)
env:
NO_PROXY: localhost,127.0.0.1,::1
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
13 changes: 12 additions & 1 deletion tests/test_runtime/test_server_capture_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def _mooncake_available() -> bool:
return importlib.util.find_spec("mooncake.store") is not None


def _log_tail(path, lines=80):
"""Last lines of a subprocess log, so CI shows why the process died."""
try:
with open(path, errors="replace") as f:
return "".join(f.readlines()[-lines:])
except OSError as exc:
return f"<could not read {path}: {exc}>"


@unittest.skipUnless(
CUDA and ENABLED,
"server-capture gate: set SPECFORGE_RUN_SERVER_CAPTURE_TESTS=1 (GPU)",
Expand Down Expand Up @@ -183,7 +192,9 @@ def setUpClass(cls):
break
time.sleep(5)
raise RuntimeError(
f"sglang server did not become healthy; see {cls.workdir}/server.log"
"sglang server did not become healthy "
f"(exit code {cls.server.poll()}); tail of {cls.workdir}/server.log:\n"
+ _log_tail(os.path.join(cls.workdir, "server.log"))
)

@classmethod
Expand Down
Loading