diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 8be7b89e076..5bcd5d6d7c4 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -116,6 +116,17 @@ jobs: timeout-minutes: 20 run: .github/scripts/uv_sync_with_retries.sh --frozen --all-groups --all-extras + - name: Install the Rust gateway + if: matrix.suite == 'management' || matrix.suite == 'management-replica' + timeout-minutes: 15 + working-directory: packaging/litellm-proxy + env: + CARGO_INCREMENTAL: "0" + run: | + uv run --no-project --with maturin==1.15.0 maturin build --profile dev --strip --out "$RUNNER_TEMP/gateway-dist" + uv pip install --no-deps --python ../../.venv/bin/python "$RUNNER_TEMP"/gateway-dist/*.whl + test -x ../../.venv/bin/litellm-gateway + - name: Install redis-server 7.2.16 timeout-minutes: 3 run: | diff --git a/litellm/proxy/rust_forward/supervisor/__init__.py b/litellm/proxy/rust_forward/supervisor/__init__.py index b6611e30ffa..768ce336af1 100644 --- a/litellm/proxy/rust_forward/supervisor/__init__.py +++ b/litellm/proxy/rust_forward/supervisor/__init__.py @@ -13,6 +13,7 @@ from litellm.proxy.rust_forward.supervisor.preflight import StartupError, gatewa from litellm.proxy.rust_forward.supervisor.runtime import SpawnFailed, exit_like, run OWN_COMMAND: Final = (sys.executable, *sys.orig_argv[1:]) +SERVING_WITHOUT_RUST: Final = "so Python serves the public port without Rust forwarding" def _nothing_to_prepare() -> None: @@ -34,7 +35,7 @@ def supervise( chosen: Final = current_platform() if platform is None else platform checked: Final = startup_check(chosen, server, gateway_binary(chosen, scripts_dir)) if isinstance(checked, StartupError): - sys.stderr.write(f"{checked.reason}, so Python serves the public port without Rust forwarding\n") + sys.stderr.write(f"{checked.reason}, {SERVING_WITHOUT_RUST}\n") return checked before_start() try: diff --git a/tests/integration/_support/rust_forward.py b/tests/integration/_support/rust_forward.py index 14b557897c5..86cc064a370 100644 --- a/tests/integration/_support/rust_forward.py +++ b/tests/integration/_support/rust_forward.py @@ -13,6 +13,7 @@ from typing import Final import httpx from pydantic import JsonValue +from litellm.proxy.rust_forward.supervisor import SERVING_WITHOUT_RUST from tests.integration._support.client import eventually from tests.integration._support.ports import allocate_port from tests.integration._support.process import stop_root_process @@ -111,6 +112,7 @@ def forwarded_proxy( ): try: assert eventually(lambda: _serving(proxy.url), bool, seconds=180), proxy.log.read_text() + assert SERVING_WITHOUT_RUST not in proxy.log.read_text(), proxy.log.read_text() yield proxy finally: assert stop_root_process(process), proxy.log.read_text()