From cf346bb15de90c447ed498ad5e99aae407e04ce2 Mon Sep 17 00:00:00 2001 From: Kangyan-Zhou Date: Thu, 30 Apr 2026 16:45:10 -0700 Subject: [PATCH] [CI] Skip worker-dependent SMG e2e tests pending runner-image debug (#24166) Co-authored-by: Claude Opus 4.7 (1M context) --- .github/workflows/pr-test-rust.yml | 12 ++++++- .../python/tests/test_startup_sequence.py | 7 ++++- sgl-model-gateway/e2e_test/fixtures/hooks.py | 31 +++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-test-rust.yml b/.github/workflows/pr-test-rust.yml index 8ead93319..feaa94e2d 100644 --- a/.github/workflows/pr-test-rust.yml +++ b/.github/workflows/pr-test-rust.yml @@ -5,11 +5,17 @@ on: branches: [ main ] paths: - "sgl-model-gateway/**" + - ".github/workflows/pr-test-rust.yml" + - "scripts/ci/cuda/ci_install_dependency.sh" + - "scripts/ci/cuda/ci_install_gateway_dependencies.sh" pull_request: branches: [ main ] types: [opened, synchronize, reopened, labeled] paths: - "sgl-model-gateway/**" + - ".github/workflows/pr-test-rust.yml" + - "scripts/ci/cuda/ci_install_dependency.sh" + - "scripts/ci/cuda/ci_install_gateway_dependencies.sh" workflow_dispatch: concurrency: @@ -344,7 +350,11 @@ jobs: summarize-benchmarks: needs: gateway-e2e runs-on: ubuntu-latest - if: success() + # Disabled while e2e tests are skipped in + # sgl-model-gateway/e2e_test/fixtures/hooks.py — no benchmarks run, so the + # genai-bench-results-all-policies artifact is never produced and the + # download step would fail. Re-enable together with the skip removal. + if: false steps: - name: Checkout code diff --git a/sgl-model-gateway/bindings/python/tests/test_startup_sequence.py b/sgl-model-gateway/bindings/python/tests/test_startup_sequence.py index 6a40a67f4..8ae727d02 100644 --- a/sgl-model-gateway/bindings/python/tests/test_startup_sequence.py +++ b/sgl-model-gateway/bindings/python/tests/test_startup_sequence.py @@ -649,7 +649,10 @@ def _install_sglang_stubs(monkeypatch): entry_mod = types.ModuleType("sglang.srt.entrypoints") http_server_mod = types.ModuleType("sglang.srt.entrypoints.http_server") server_args_mod = types.ModuleType("sglang.srt.server_args") + # sglang.srt.utils was refactored from a module into a package; launch_server.py + # imports from sglang.srt.utils.network, so the stub must model the submodule. utils_mod = types.ModuleType("sglang.srt.utils") + network_mod = types.ModuleType("sglang.srt.utils.network") def launch_server(_args): return None @@ -684,7 +687,8 @@ def _install_sglang_stubs(monkeypatch): http_server_mod.launch_server = launch_server server_args_mod.ServerArgs = ServerArgs - utils_mod.is_port_available = is_port_available + network_mod.is_port_available = is_port_available + utils_mod.network = network_mod # Also stub external deps imported at module top-level def _dummy_get(*_a, **_k): @@ -706,6 +710,7 @@ def _install_sglang_stubs(monkeypatch): ) monkeypatch.setitem(sys.modules, "sglang.srt.server_args", server_args_mod) monkeypatch.setitem(sys.modules, "sglang.srt.utils", utils_mod) + monkeypatch.setitem(sys.modules, "sglang.srt.utils.network", network_mod) def test_router_defaults_and_start(monkeypatch): diff --git a/sgl-model-gateway/e2e_test/fixtures/hooks.py b/sgl-model-gateway/e2e_test/fixtures/hooks.py index 2cbbb427a..ed8a5632b 100644 --- a/sgl-model-gateway/e2e_test/fixtures/hooks.py +++ b/sgl-model-gateway/e2e_test/fixtures/hooks.py @@ -233,6 +233,37 @@ def pytest_collection_modifyitems( else: logger.info("Scanned worker requirements: (none)") + # TEMPORARY: skip every test that would launch an sglang worker subprocess. + # + # Workers crash at import inside transformers.integrations.hub_kernels → + # kernels.deps with: + # StrictDataclassFieldValidationError: Validation error for field + # 'import_name': TypeError: Unsupported type for field 'import_name': str | None + # + # The package combo (kernels==0.13.0 + huggingface_hub==1.12.2 + + # transformers==5.6.0) is NOT the bug — it imports cleanly in fresh + # python:3.10-slim and lmsysorg/sglang:dev containers. The crash is specific + # to the 4-gpu-a10 runner image (most likely a stale/partial huggingface_hub + # install where _BASIC_TYPE_VALIDATORS[types.UnionType] registration is + # missing). Remove this skip once the runner image is rebuilt. + # + # Filter on `model_pool` in fixturenames (covers setup_backend, model_client, + # model_base_url, backend_router — all transitively depend on model_pool) so + # tests without an explicit `@pytest.mark.e2e` marker are also skipped. Then + # clear scanned worker requirements so model_pool — if realized for any + # non-skipped fixture — starts empty and never spawns a worker. + skip_marker = pytest.mark.skip( + reason="worker-dependent tests disabled: SMG runner image crash on transformers.integrations.hub_kernels import" + ) + for item in items: + if ( + item.get_closest_marker("e2e") is not None + or "model_pool" in item.fixturenames + ): + item.add_marker(skip_marker) + _worker_counts.clear() + _first_seen_order.clear() + # --------------------------------------------------------------------------- # Pool requirements