Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ steps:
apt-get update && apt-get install -y pkg-config libssl-dev protobuf-compiler
rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
# Free agent disk: target/ holds multi-GB of build artifacts
# that are never reused across jobs (separate checkouts).
rm -rf target || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve command failures while removing target

These Docker plugin commands explicitly invoke bash -c without -e, so if Clippy fails, execution continues and this successful rm -rf ... || true becomes the shell's exit status, making the check pass. The same failure masking occurs in the newly appended cleanup commands for the release build, wheel build, unit tests, integration tests, and Python tests; use an EXIT trap that preserves the original status (or otherwise capture and return it) so cleanup cannot turn failed CI checks green.

Useful? React with 👍 / 👎.

agents:
queue: "cpu_queue_premerge"

Expand Down Expand Up @@ -90,6 +93,9 @@ steps:
- |
apt-get update && apt-get install -y pkg-config libssl-dev protobuf-compiler
cargo build --release
# Keep only the binary (uploaded as artifact below); the
# intermediate artifacts are multi-GB and leak agent disk.
rm -rf target/release/build target/release/deps target/release/.fingerprint target/release/incremental target/debug || true
artifact_paths:
- "target/release/vllm-router"
agents:
Expand All @@ -114,6 +120,8 @@ steps:
source /tmp/venv/bin/activate
pip install -U pip setuptools wheel setuptools-rust build
python -m build
# Free agent disk: cargo intermediates from the wheel build.
rm -rf target || true
artifact_paths:
- "dist/*.whl"
- "dist/*.tar.gz"
Expand Down Expand Up @@ -146,6 +154,8 @@ steps:
- |
apt-get update && apt-get install -y pkg-config libssl-dev protobuf-compiler
cargo test --lib --bins
# Free agent disk: cargo intermediates are never reused.
rm -rf target || true
agents:
queue: "cpu_queue_premerge"

Expand All @@ -165,6 +175,8 @@ steps:
- |
apt-get update && apt-get install -y pkg-config libssl-dev protobuf-compiler
cargo test --test '*'
# Free agent disk: cargo intermediates are never reused.
rm -rf target || true
agents:
queue: "cpu_queue_premerge"

Expand All @@ -189,6 +201,8 @@ steps:
pip install -e .[dev]
pip install pytest pytest-cov pytest-asyncio
pytest py_test/ -v --ignore=py_test/e2e --cov=vllm_router --cov-report=xml --cov-report=term
# Free agent disk: editable install's cargo intermediates.
rm -rf target || true
artifact_paths:
- "coverage.xml"
agents:
Expand Down Expand Up @@ -241,6 +255,12 @@ steps:
fi
echo "HF_TOKEN is configured."

# Disk hygiene: previous runs leave ~20GB venv (vllm + torch
# cu130) and cargo intermediates in the /workdir checkout on
# this shared GPU agent. Clean up even when the job fails.
rm -rf .venv target || true
trap 'rm -rf /workdir/.venv /workdir/target || true' EXIT

# Install system dependencies
apt-get update && apt-get install -y \
curl \
Expand Down Expand Up @@ -439,10 +459,33 @@ steps:
# ============================================================================
# Docker Build - Parallel with tests
# ============================================================================
# NOTE on disk hygiene: this step used to leave a multi-GB image tagged
# vllm-router:<commit> on the agent's Docker daemon on every build. Nothing
# consumes the local tags downstream (release images are built and pushed to
# DockerHub by release-pipeline.yml), so after ~800 builds the shared
# cpu_queue_premerge agents ran out of disk. We now prune stale images/cache
# before building and remove the produced image after a smoke test.
- label: ":docker: Build Docker Image"
command: |
df -h / || true
# Reclaim disk leaked by earlier builds: old per-commit vllm-router
# tags, dangling layers, and stale build cache. All vllm-router images
# can go: latest is re-tagged below in this same step.
# NB: no awk positional args here — the pipeline uploader's env
# interpolation rejects identifiers that don't start with a letter.
docker images -q vllm-router | xargs -r docker rmi -f || true
docker image prune -f --filter "until=168h" || true
docker builder prune -f --filter "until=168h" --keep-storage 10GB || true
df -h / || true

docker build -f Dockerfile.router -t vllm-router:${BUILDKITE_COMMIT} .
docker tag vllm-router:${BUILDKITE_COMMIT} vllm-router:latest

# Smoke test the image, then drop it: keeping one multi-GB image per
# commit fills the agent disk.
docker run --rm --entrypoint /bin/sh vllm-router:latest -c 'vllm-router --version'
docker rmi vllm-router:${BUILDKITE_COMMIT} vllm-router:latest || true
df -h / || true
agents:
queue: "cpu_queue_premerge"
depends_on: "build"