Rainj me/rust server refactor2 (#35239)

This commit is contained in:
Rain Jiang
2026-08-21 16:37:02 -07:00
committed by GitHub
parent fe8f9d7457
commit 7d7ab4b5c6
61 changed files with 2531 additions and 2193 deletions
@@ -25,6 +25,8 @@ on:
value: ${{ jobs.run.outputs.jit_kernel }}
multimodal_gen:
value: ${{ jobs.run.outputs.multimodal_gen }}
rust_workspace:
value: ${{ jobs.run.outputs.rust_workspace }}
partitions:
value: ${{ jobs.run.outputs.partitions }}
partition_model_sha:
@@ -45,6 +47,7 @@ jobs:
sgl_kernel: ${{ steps.filter.outputs.sgl_kernel }}
jit_kernel: ${{ steps.filter.outputs.jit_kernel || steps.run-mode.outputs.run_all_tests }}
multimodal_gen: ${{ steps.filter.outputs.multimodal_gen || steps.run-mode.outputs.run_all_tests }}
rust_workspace: ${{ steps.filter.outputs.rust_workspace || steps.run-mode.outputs.run_all_tests }}
partitions: ${{ steps.partitions.outputs.partitions }}
partition_model_sha: ${{ steps.partition-model-sha.outputs.sha }}
runs_on_map: ${{ steps.runner-map.outputs.runs_on_map }}
@@ -89,6 +92,8 @@ jobs:
- "scripts/ci/cuda/*"
- "scripts/ci/utils/*"
- "test/**/!(*.md)"
- "rust/**"
- "proto/sglang/runtime/v1/sglang.proto"
multimodal_gen:
- ".github/workflows/pr-test.yml"
- ".github/workflows/pr-test-multimodal-gen.yml"
@@ -113,6 +118,13 @@ jobs:
# Intentionally excludes ".github/workflows/pr-test-sgl-kernel.yml" —
# see API-side detector below for rationale.
- "python/sglang/kernels/aot/**/!(*.md|THIRDPARTYNOTICES.txt|LICENSE)"
rust_workspace:
# Gates the cargo test in test/registered/rust/; exported to the
# CPU stage as its negation, SGLANG_SKIP_RUST_TESTS.
- "rust/**"
- "proto/sglang/runtime/v1/sglang.proto"
- "test/registered/rust/**"
- ".github/workflows/_pr-test-*.yml"
- name: Determine full-parallel mode
id: parallel-mode
@@ -223,6 +235,7 @@ jobs:
echo "| sgl_kernel | ${{ steps.filter.outputs.sgl_kernel }} |"
echo "| jit_kernel | ${{ steps.filter.outputs.jit_kernel || steps.run-mode.outputs.run_all_tests }} |"
echo "| multimodal_gen | ${{ steps.filter.outputs.multimodal_gen || steps.run-mode.outputs.run_all_tests }} |"
echo "| rust_workspace | ${{ steps.filter.outputs.rust_workspace || steps.run-mode.outputs.run_all_tests }} |"
echo "| b200_runner | ${{ steps.set-runner.outputs.b200_runner }} |"
echo "| enable_retry | ${{ steps.set-retry.outputs.enable_retry }} |"
echo "| continue_on_error | ${{ steps.set-continue-on-error.outputs.continue_on_error }} |"
+4 -1
View File
@@ -13,7 +13,7 @@ on:
type: string
required: true
check_changes:
description: 'toJson(needs.check-changes.outputs). Read via fromJson(...).main_package / continue_on_error / partition_model_sha.'
description: 'toJson(needs.check-changes.outputs). Read via fromJson(...).main_package / rust_workspace / continue_on_error / partition_model_sha.'
type: string
required: true
caller_inputs:
@@ -153,6 +153,9 @@ jobs:
timeout-minutes: ${{ fromJson(inputs.run_timeout_minutes) }}
env:
CONTINUE_ON_ERROR_FLAG: ${{ fromJson(inputs.check_changes).continue_on_error == 'true' && '--continue-on-error' || '' }}
# Normalized to a literal true/false: EnvBool rejects an empty string,
# which is what a missing check-changes output would expand to.
SGLANG_SKIP_RUST_TESTS: ${{ fromJson(inputs.check_changes).rust_workspace == 'true' && 'false' || 'true' }}
run: |
cd test/
python3 run_suite.py --hw cpu --suite ${{ inputs.self_name }} --auto-partition-id ${{ matrix.partition }} --auto-partition-size ${{ fromJson(inputs.partitions)[inputs.self_name].size }} --partition-model-file /tmp/partition-model.json $CONTINUE_ON_ERROR_FLAG
-17
View File
@@ -13,16 +13,6 @@ jobs:
with:
fetch-depth: 0
- name: Detect Rust workspace changes
id: paths
uses: dorny/paths-filter@v3
with:
filters: |
rust_workspace:
- 'rust/**'
- 'proto/sglang/runtime/v1/sglang.proto'
- '.github/workflows/lint.yml'
# Fail-fast gate: docs_new/ was renamed to docs/ (#32123). git's rename
# detection silently re-adds NEW files under docs_new/ on merge without a
# conflict, which would resurrect the directory. We check the checked-out
@@ -60,13 +50,6 @@ jobs:
- name: Run pre-commit checks
run: SKIP=no-commit-to-branch pre-commit run --all-files --show-diff-on-failure
# Not in the rust-ext build job: its cache key covers the built .so files,
# and a test script is not a build input. Tests take ~1s; the timeout is
# for a cold cache, which codegens the dependency graph first.
- name: Run rust/ workspace tests
if: steps.paths.outputs.rust_workspace == 'true'
run: cd rust && timeout 900 cargo test --workspace
- name: Run lychee docs checks (offline references)
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
with: