Skip to content

[Rust] Derive server address and accept signed env values - #37221

Merged
merrymercy merged 15 commits into
mainfrom
rust-server-cleanup-2-config
Aug 31, 2026
Merged

merrymercy merged 15 commits into
mainfrom
rust-server-cleanup-2-config

Conversation

@merrymercy

@merrymercy merrymercy commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Make the embedded server launch boundary use the typed server configuration as its single address source, and match signed Python EnvInt values. This is PR 2 of 4 in stack #37223.

Modifications

  • Replace the Python-facing optional http_addr override with port_offset: Option<u16>.
  • Read the host and base port from server_args, add the DP-rank offset with overflow validation, and keep IPv6 handling.
  • Replace env_u64 with env_i64 so negative values parse successfully.
  • Treat a negative max-batch limit as unlimited and clamp negative duration settings to zero.
  • Add unit coverage for offset binding, overflow, signed parsing, and the negative batch-limit sentinel.

Test plan

  • cargo test --manifest-path rust/sglang-server/Cargo.toml --lib (248 passed on this layer)
  • Rustfmt and targeted Python lint/format checks
  • Focused registered tests are triggered in a PR comment.

Stack


CI States

Latest PR Test (Base): 🚫 Run #33430947092
Latest PR Test (Extra): 🚫 Run #33430947015
Latest PR Test (AMD ROCm 7.2): 🚫 Run #33430946999

@merrymercy merrymercy changed the title rust-server-cleanup(config,non_mechanical_provable): derive listen address and accept signed env values [Rust] Derive server address and accept signed env values Aug 31, 2026
@merrymercy

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py:

🚀 ubuntu-latest (1 test): ❌ View workflow run

cd test/ && python3 registered/rust/test_run_rust_tests.py

🚀 1-gpu-5090 (1 test): ❌ View workflow run

cd test/ && python3 registered/core/test_srt_endpoint.py

🚀 1-gpu-h100 (2 tests): ❌ View workflow run

cd test/ && python3 registered/vlm/test_rust_native_mm_e2e.py
cd test/ && python3 registered/vlm/test_rust_native_mm_mmmu.py

@merrymercy merrymercy added the run-ci CI: run the baseline test suite on this PR label Aug 31, 2026
@merrymercy

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py:

🚀 ubuntu-latest (1 test): ❌ View workflow run

cd test/ && python3 registered/rust/test_run_rust_tests.py

🚀 1-gpu-5090 (1 test): ❌ View workflow run

cd test/ && python3 registered/core/test_srt_endpoint.py

🚀 1-gpu-h100 (2 tests): ⏳ View workflow run

cd test/ && python3 registered/vlm/test_rust_native_mm_e2e.py
cd test/ && python3 registered/vlm/test_rust_native_mm_mmmu.py

@merrymercy

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py:

🚀 ubuntu-latest (1 test): ✅ View workflow run

cd test/ && python3 registered/rust/test_run_rust_tests.py

🚀 1-gpu-5090 (1 test): ❌ View workflow run

cd test/ && python3 registered/core/test_srt_endpoint.py

🚀 1-gpu-h100 (2 tests): ❌ View workflow run

cd test/ && python3 registered/vlm/test_rust_native_mm_e2e.py
cd test/ && python3 registered/vlm/test_rust_native_mm_mmmu.py

Comment thread rust/sglang-server/src/utils/server.rs Outdated
@merrymercy

Copy link
Copy Markdown
Collaborator Author

approve

@merrymercy

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-test test/registered/rust/test_run_rust_tests.py test/registered/core/test_srt_endpoint.py test/registered/vlm/test_rust_native_mm_e2e.py test/registered/vlm/test_rust_native_mm_mmmu.py:

🚀 ubuntu-latest (1 test): ✅ View workflow run

cd test/ && python3 registered/rust/test_run_rust_tests.py

🚀 1-gpu-5090 (1 test): ✅ View workflow run

cd test/ && python3 registered/core/test_srt_endpoint.py

🚀 1-gpu-h100 (2 tests): ✅ View workflow run

cd test/ && python3 registered/vlm/test_rust_native_mm_e2e.py
cd test/ && python3 registered/vlm/test_rust_native_mm_mmmu.py

@merrymercy
merrymercy changed the base branch from rust-server-cleanup-1-structure to main August 31, 2026 19:28
@merrymercy
merrymercy merged commit 48098b5 into main Aug 31, 2026
9 of 14 checks passed
@merrymercy
merrymercy deleted the rust-server-cleanup-2-config branch August 31, 2026 19:30
StevenChenSE pushed a commit to StevenChenSE/sglang that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants