ci(integration): install the Rust gateway and fail forwarded_proxy when Rust is not in front (#51307)

* ci(integration): install the Rust gateway and fail forwarded_proxy when Rust is not in front

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* ci(integration): build the Rust gateway only for the management suites that run forwarded_proxy

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Mateo Wang 2026-11-12 04:07:07 +00:00 • committed by GitHub
parent 454424c36c
commit a3c52e69d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 1 deletions

View file

@ -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: |

View file

@ -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:

View file

@ -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()