Skip to content

Commit 18f3cdc

Browse files
Merge branch 'main' into fix/per-prompt-mm-features
2 parents 20db0a1 + 08dce7a commit 18f3cdc

134 files changed

Lines changed: 5857 additions & 23206 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: CI - Coordinator Test
2+
3+
# Runs coordinator unit tests and e2e tests. Path filter excludes paths not
4+
# exercised by the coordinator.
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- 'release-*'
10+
pull_request:
11+
branches:
12+
- main
13+
14+
permissions:
15+
contents: read
16+
actions: read
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
check-changes:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
src: ${{ steps.filter.outputs.src }}
27+
steps:
28+
- name: Checkout source
29+
uses: actions/checkout@v7
30+
- uses: dorny/paths-filter@v4
31+
id: filter
32+
with:
33+
filters: |
34+
src:
35+
- '**/*.go'
36+
- Dockerfile.*
37+
- Makefile*
38+
- go.mod
39+
- go.sum
40+
- scripts/**
41+
- hack/**
42+
- test/**
43+
- .github/actions/e2e-runner-setup/action.yml
44+
- .github/workflows/ci-coordinator.yaml
45+
- '!Dockerfile.sidecar'
46+
- '!cmd/pd-sidecar/**'
47+
- '!pkg/sidecar/**'
48+
- '!test/sidecar/**'
49+
- '!pkg/generator/**'
50+
- '!test/e2e/**'
51+
- '!test/integration/**'
52+
- '!test/profiling/**'
53+
- '!Makefile'
54+
55+
unit-tests:
56+
needs: check-changes
57+
if: ${{ needs.check-changes.outputs.src == 'true' }}
58+
runs-on: ubuntu-latest
59+
timeout-minutes: 30
60+
steps:
61+
- name: Checkout source
62+
uses: actions/checkout@v7
63+
64+
- name: Create Go cache dirs
65+
id: go-cache
66+
run: |
67+
mkdir -p "$HOME/.cache/llm-d-gomodcache" "$HOME/.cache/llm-d-gobuildcache"
68+
echo "mod=$HOME/.cache/llm-d-gomodcache" >> "$GITHUB_OUTPUT"
69+
echo "build=$HOME/.cache/llm-d-gobuildcache" >> "$GITHUB_OUTPUT"
70+
71+
- name: Cache Go modules and build cache
72+
uses: actions/cache@v6
73+
with:
74+
path: |
75+
${{ steps.go-cache.outputs.mod }}
76+
${{ steps.go-cache.outputs.build }}
77+
key: go-cache-${{ runner.os }}-${{ hashFiles('go.sum') }}
78+
restore-keys: |
79+
go-cache-${{ runner.os }}-
80+
81+
- name: Run coordinator unit tests
82+
shell: bash
83+
env:
84+
GO_MOD_CACHE_VOL: ${{ steps.go-cache.outputs.mod }}
85+
GO_BUILD_CACHE_VOL: ${{ steps.go-cache.outputs.build }}
86+
run: make -f Makefile.coord.mk test-unit
87+
88+
e2e-tests:
89+
needs: check-changes
90+
if: ${{ needs.check-changes.outputs.src == 'true' }}
91+
runs-on: ubuntu-latest
92+
timeout-minutes: 60
93+
steps:
94+
- name: Checkout source
95+
uses: actions/checkout@v7
96+
97+
- name: Set up e2e runner
98+
id: e2e-setup
99+
uses: ./.github/actions/e2e-runner-setup
100+
101+
- name: Run coordinator e2e tests
102+
shell: bash
103+
env:
104+
GO_MOD_CACHE_VOL: ${{ steps.e2e-setup.outputs.go-mod-cache }}
105+
GO_BUILD_CACHE_VOL: ${{ steps.e2e-setup.outputs.go-build-cache }}
106+
run: make -f Makefile.coord.mk test-e2e-coordinator

.github/workflows/ci-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
uses: actions/checkout@v7
6363

6464
- name: Set up Go
65-
uses: actions/setup-go@v6
65+
uses: actions/setup-go@v7
6666
with:
6767
go-version-file: go.mod
6868
cache: true

.github/workflows/ci-pr-checks.yaml

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Matrix jobs (e2e-image-common, e2e-image-router, e2e-router) are each
1+
# Matrix jobs (e2e-image-common, e2e-image-router) are each
22
# followed by a *-status job that aggregates their result, since GitHub
33
# required status checks cannot reference individual matrix legs.
44
name: CI - Test
@@ -45,6 +45,11 @@ jobs:
4545
- .github/actions/docker-build-and-push/action.yml
4646
- .github/actions/e2e-runner-setup/action.yml
4747
- .github/workflows/ci-pr-checks.yaml
48+
- '!Dockerfile.coordinator'
49+
- '!Makefile.coord.mk'
50+
- '!cmd/coordinator/**'
51+
- '!pkg/coordinator/**'
52+
- '!test/coordinator/**'
4853
helm:
4954
- 'config/charts/**'
5055
- 'hack/verify-helm.sh'
@@ -59,7 +64,7 @@ jobs:
5964
uses: actions/checkout@v7
6065

6166
- name: Set up Go
62-
uses: actions/setup-go@v6
67+
uses: actions/setup-go@v7
6368
with:
6469
go-version-file: go.mod
6570

@@ -108,6 +113,16 @@ jobs:
108113
GO_BUILD_CACHE_VOL: ${{ steps.go-cache.outputs.build }}
109114
run: make test-unit
110115

116+
# Anti-rot: execute the benchmark bodies once so runtime breakage (panics,
117+
# deadlocks) is caught. `go test` only compiles benchmarks; it never runs
118+
# them without -bench.
119+
- name: Run benchmark smoke
120+
shell: bash
121+
env:
122+
GO_MOD_CACHE_VOL: ${{ steps.go-cache.outputs.mod }}
123+
GO_BUILD_CACHE_VOL: ${{ steps.go-cache.outputs.build }}
124+
run: make bench-smoke
125+
111126
- name: Run hermetic integration tests
112127
shell: bash
113128
env:
@@ -343,29 +358,6 @@ jobs:
343358
if: ${{ needs.check-changes.outputs.src == 'true' }}
344359
runs-on: ubuntu-latest
345360
timeout-minutes: 45
346-
strategy:
347-
fail-fast: false
348-
matrix:
349-
suite:
350-
- name: pd
351-
label-filter: "!Disruptive && !Extended && !SharedStorage && !Metrics"
352-
needs-renderer: "false"
353-
- name: pd-shared-storage-deprecated
354-
label-filter: "SharedStorage && DeprecatedPD"
355-
needs-renderer: "false"
356-
- name: pd-shared-storage-disagg
357-
label-filter: "SharedStorage && Disagg"
358-
needs-renderer: "false"
359-
- name: pd-metrics
360-
label-filter: "Metrics"
361-
needs-renderer: "false"
362-
- name: extended
363-
label-filter: "Extended"
364-
needs-renderer: "true"
365-
- name: disruption
366-
label-filter: "Disruptive"
367-
needs-renderer: "false"
368-
name: e2e-router (${{ matrix.suite.name }})
369361
steps:
370362
- name: Checkout source
371363
uses: actions/checkout@v7
@@ -399,7 +391,6 @@ jobs:
399391
path: ${{ runner.temp }}/e2e-images
400392

401393
- name: Download renderer image
402-
if: ${{ matrix.suite.needs-renderer == 'true' }}
403394
uses: actions/download-artifact@v8
404395
with:
405396
name: e2e-image-renderer
@@ -412,26 +403,11 @@ jobs:
412403
docker load --input "$image"
413404
done
414405
415-
- name: Run e2e-router (${{ matrix.suite.name }})
406+
- name: Run e2e-router
416407
shell: bash
417408
env:
418409
GO_MOD_CACHE_VOL: ${{ steps.e2e-setup.outputs.go-mod-cache }}
419410
GO_BUILD_CACHE_VOL: ${{ steps.e2e-setup.outputs.go-build-cache }}
420-
E2E_LABEL_FILTER: ${{ matrix.suite.label-filter }}
421-
LOAD_VLLM_RENDER_IMAGE: ${{ matrix.suite.needs-renderer }}
422411
PULL_VLLM_RENDER_IMAGE: "false"
423412
HF_TOKEN: ${{ secrets.HF_TOKEN }}
424413
run: make test-e2e-run
425-
426-
e2e-router-status:
427-
needs: e2e-router
428-
if: always()
429-
runs-on: ubuntu-latest
430-
steps:
431-
- name: Check e2e-router result
432-
run: |
433-
result="${{ needs.e2e-router.result }}"
434-
if [[ "$result" != "success" && "$result" != "skipped" ]]; then
435-
echo "::error::e2e-router failed for at least one matrix suite"
436-
exit 1
437-
fi

.github/workflows/ci-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
uses: actions/checkout@v7
6363

6464
- name: Set up Go
65-
uses: actions/setup-go@v6
65+
uses: actions/setup-go@v7
6666
with:
6767
go-version-file: go.mod
6868

.github/workflows/nightly-router-perf-test-optimized-baseline-10k-1k.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,21 @@ jobs:
6767
HF_TOKEN: ${{ secrets.HF_TOKEN }}
6868
steps:
6969
- name: Checkout llm-d/llm-d-router
70-
uses: actions/checkout@v6
70+
uses: actions/checkout@v7
7171

7272
- name: Checkout kubernetes-sigs/inference-perf
73-
uses: actions/checkout@v6
73+
uses: actions/checkout@v7
7474
with:
7575
repository: kubernetes-sigs/inference-perf
7676
path: inference-perf
7777

7878
- name: Authenticate to Google Cloud
79-
uses: google-github-actions/auth@v2
79+
uses: google-github-actions/auth@v3
8080
with:
8181
credentials_json: ${{ secrets.GKE_SA_KEY }}
8282

8383
- name: Set up gcloud CLI and kubectl
84-
uses: google-github-actions/setup-gcloud@v2
84+
uses: google-github-actions/setup-gcloud@v3
8585
with:
8686
project_id: ${{ env.GCP_PROJECT_ID }}
8787
install_components: 'kubectl,gke-gcloud-auth-plugin'
@@ -97,7 +97,7 @@ jobs:
9797
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
9898
9999
- name: Set up Python
100-
uses: actions/setup-python@v5
100+
uses: actions/setup-python@v7
101101
with:
102102
python-version: "3.10"
103103

@@ -125,7 +125,7 @@ jobs:
125125
--gcs-bucket ${{ env.GCS_BUCKET }}
126126
127127
- name: Upload Performance Results Artifact
128-
uses: actions/upload-artifact@v4
128+
uses: actions/upload-artifact@v7
129129
if: always()
130130
with:
131131
name: epp-perf-results

DEVELOPMENT.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Documentation for developing the llm-d Router.
1111
- [Kind Development Environment](#kind-development-environment)
1212
- [Accessing the Gateway](#accessing-the-gateway)
1313
- [Prometheus Monitoring](#prometheus-monitoring)
14-
- [Grafana Dashboard](#grafana-dashboard)
1514
- [Development Cycle](#development-cycle)
1615
- [Debugging](#debugging)
1716
- [Inference Disaggregation Modes](#inference-disaggregation-modes)
@@ -170,17 +169,10 @@ Prometheus will be accessible at `http://localhost:30090`. To use a different ho
170169
PROM_ENABLED=true KIND_PROM_HOST_PORT=30091 make env-dev-kind
171170
```
172171

173-
### Grafana Dashboard
174-
175-
The bundled [Inference Gateway dashboard] covers EPP metrics across the inference
176-
pool, inference objective, and flow control layers.
177-
178-
Add a Prometheus datasource at `http://localhost:30090`, then import the JSON via
179-
**Dashboards > New > Import**. See the
180-
[Grafana installation docs](https://grafana.com/docs/grafana/latest/setup-grafana/installation/)
181-
for setup.
182-
183-
[Inference Gateway dashboard]:deploy/grafana/inference_gateway.json
172+
Grafana dashboards for the llm-d Router live in the
173+
[llm-d monorepo](https://github.com/llm-d/llm-d/tree/main/guides/recipes/observability/grafana/dashboards).
174+
See [Observability Setup](https://github.com/llm-d/llm-d/blob/main/docs/operations/observability/setup.md)
175+
for install and import instructions.
184176

185177
> [!NOTE]
186178
> For significant customization beyond the standard deployment, use the `deploy/components`

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,14 @@ BUILDER_SOCK_FLAGS = $(DOCKER_GROUP_PARAM) \
119119
-e CONTAINER_RUNTIME=docker
120120
endif
121121

122+
E2E_NUM_PROCS ?= 5
123+
122124
# Env vars forwarded into the e2e test container.
123125
# Add new image vars here so they are automatically passed through.
124126
# Should we pass ALL env vars here?
125127
E2E_ENV_VARS = EPP_IMAGE VLLM_IMAGE SIDECAR_IMAGE VLLM_RENDER_IMAGE \
126128
E2E_KEEP_CLUSTER_ON_FAILURE E2E_PORT E2E_METRICS_PORT K8S_CONTEXT READY_TIMEOUT \
127-
E2E_LABEL_FILTER LOAD_VLLM_RENDER_IMAGE HF_TOKEN
129+
E2E_NUM_PROCS LOAD_VLLM_RENDER_IMAGE HF_TOKEN
128130
BUILDER_E2E_ENV_FLAGS = $(foreach v,$(E2E_ENV_VARS),$(if $($(v)),-e '$(v)=$($(v))'))
129131
ifneq ($(filter command line environment,$(origin NAMESPACE)),)
130132
BUILDER_E2E_ENV_FLAGS += -e NAMESPACE=$(NAMESPACE)
@@ -159,7 +161,7 @@ LDFLAGS ?= -s -w
159161
BASE_IMAGE ?=
160162

161163
# test packages
162-
epp_TEST_PACKAGES = $$(go list ./... | grep -v /test/ | grep -v ./pkg/sidecar/ | tr '\n' ' ')
164+
epp_TEST_PACKAGES = $$(go list ./... | grep -v /test/ | grep -v ./pkg/sidecar/ | grep -v ./pkg/coordinator/ | grep -v ./cmd/coordinator | tr '\n' ' ')
163165
sidecar_TEST_PACKAGES = ./pkg/sidecar/...
164166

165167
# Internal variables for generic targets
@@ -313,6 +315,11 @@ bench-tokenizer: image-build-builder ## Run external tokenizer + scorer benchmar
313315
@printf "Run 'EXTERNAL_TOKENIZER_ENABLED=true KV_CACHE_ENABLED=true make env-dev-kind' first.\n\n"
314316
$(BUILDER_RUN_CLUSTER) 'go test -bench=. -benchmem -count=5 -timeout=5m ./test/profiling/tokenizerbench/'
315317

318+
.PHONY: bench-smoke
319+
bench-smoke: image-build-builder ## Smoke-run the flowcontrol benchmarks once (-benchtime=1x) to catch runtime rot
320+
@printf "\033[33;1m==== Running Flow Control Benchmark Smoke ====\033[0m\n"
321+
$(BUILDER_RUN) 'go test -run=^$$ -bench=. -benchtime=1x -timeout=5m ./pkg/epp/flowcontrol/benchmark/...'
322+
316323
.PHONY: post-deploy-test
317324
post-deploy-test: ## Run post deployment tests
318325
@echo "Success!"

0 commit comments

Comments
 (0)