Skip to content

Commit 00fbe80

Browse files
committed
♻️ refactor(e2e/profiles/llm-d): simplify profile setup and update testcases
Signed-off-by: samzong <samzong.lu@gmail.com>
1 parent a9abbac commit 00fbe80

File tree

8 files changed

+24
-582
lines changed

8 files changed

+24
-582
lines changed

e2e/cmd/e2e/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import (
1212
aigateway "github.com/vllm-project/semantic-router/e2e/profiles/ai-gateway"
1313
aibrix "github.com/vllm-project/semantic-router/e2e/profiles/aibrix"
1414
dynamicconfig "github.com/vllm-project/semantic-router/e2e/profiles/dynamic-config"
15+
llmd "github.com/vllm-project/semantic-router/e2e/profiles/llm-d"
1516
routingstrategies "github.com/vllm-project/semantic-router/e2e/profiles/routing-strategies"
1617

1718
// Import profiles to register test cases
1819
_ "github.com/vllm-project/semantic-router/e2e/profiles/ai-gateway"
1920
_ "github.com/vllm-project/semantic-router/e2e/profiles/aibrix"
21+
_ "github.com/vllm-project/semantic-router/e2e/profiles/llm-d"
2022
_ "github.com/vllm-project/semantic-router/e2e/profiles/routing-strategies"
2123
)
2224

@@ -105,6 +107,8 @@ func getProfile(name string) (framework.Profile, error) {
105107
return dynamicconfig.NewProfile(), nil
106108
case "aibrix":
107109
return aibrix.NewProfile(), nil
110+
case "llm-d":
111+
return llmd.NewProfile(), nil
108112
case "routing-strategies":
109113
return routingstrategies.NewProfile(), nil
110114
// Add more profiles here as they are implemented

e2e/profiles/llm-d/profile.go

Lines changed: 20 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,20 @@ import (
2222
)
2323

2424
const (
25-
kindNamespace = "default"
26-
semanticNamespace = "vllm-semantic-router-system"
27-
gatewayNamespace = "istio-system"
28-
inferenceGatewayName = "inference-gateway"
29-
istioVersion = "1.28.0"
30-
gatewayCRDURL = "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml"
31-
inferenceCRDURL = "https://github.com/kubernetes-sigs/gateway-api-inference-extension/releases/download/v1.1.0/manifests.yaml"
25+
kindNamespace = "default"
26+
semanticNamespace = "vllm-semantic-router-system"
27+
gatewayNamespace = "istio-system"
28+
istioVersion = "1.28.0"
29+
gatewayCRDURL = "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml"
30+
inferenceCRDURL = "https://github.com/kubernetes-sigs/gateway-api-inference-extension/releases/download/v1.1.0/manifests.yaml"
3231
)
3332

3433
type Profile struct {
35-
verbose bool
36-
useExisting bool
37-
skipSetup bool
38-
versions struct {
39-
istio string
40-
gateway string
41-
inference string
42-
inferenceController string
43-
}
34+
verbose bool
4435
}
4536

4637
func NewProfile() *Profile {
47-
p := &Profile{}
48-
p.versions.istio = istioVersion
49-
p.versions.gateway = gatewayCRDURL
50-
p.versions.inference = inferenceCRDURL
51-
ctrlURL := os.Getenv("GAIE_CONTROLLER_URL")
52-
if ctrlURL == "" {
53-
ctrlURL = inferenceCRDURL
54-
}
55-
p.versions.inferenceController = ctrlURL
56-
return p
38+
return &Profile{}
5739
}
5840

5941
func (p *Profile) Name() string {
@@ -66,16 +48,9 @@ func (p *Profile) Description() string {
6648

6749
func (p *Profile) Setup(ctx context.Context, opts *framework.SetupOptions) error {
6850
p.verbose = opts.Verbose
69-
p.useExisting = strings.EqualFold(os.Getenv("LLMD_USE_EXISTING"), "true") || os.Getenv("LLMD_USE_EXISTING") == "1"
70-
p.skipSetup = strings.EqualFold(os.Getenv("LLMD_SKIP_SETUP"), "true") || os.Getenv("LLMD_SKIP_SETUP") == "1"
71-
72-
fmt.Printf("[Profile] llm-d setup start (istio=%s, gatewayCRD=%s, inferenceCRD=%s, controller=%s, useExisting=%v, skipSetup=%v)\n",
73-
p.versions.istio, p.versions.gateway, p.versions.inference, p.versions.inferenceController, p.useExisting, p.skipSetup)
7451

75-
if p.skipSetup {
76-
fmt.Println("[Profile] LLMD_SKIP_SETUP set; skipping deploy steps, running verification only")
77-
return p.verifyEnvironment(ctx, opts)
78-
}
52+
fmt.Printf("[Profile] llm-d setup start (istio=%s, gatewayCRD=%s, inferenceCRD=%s)\\n",
53+
istioVersion, gatewayCRDURL, inferenceCRDURL)
7954

8055
rollback := []func(){}
8156
rollbackAll := func() {
@@ -221,27 +196,17 @@ func (p *Profile) Teardown(ctx context.Context, opts *framework.TeardownOptions)
221196
}
222197

223198
func (p *Profile) GetTestCases() []string {
224-
tests := []string{
225-
"llmd-health-check",
226-
"llmd-distributed-inference",
227-
"llmd-auto-routing",
228-
"llmd-failover-recovery",
229-
"llmd-performance-baseline",
230-
}
231-
if strings.EqualFold(os.Getenv("LLMD_PERF_SKIP"), "true") || os.Getenv("LLMD_PERF_SKIP") == "1" {
232-
var filtered []string
233-
for _, t := range tests {
234-
if t == "llmd-performance-baseline" {
235-
continue
236-
}
237-
filtered = append(filtered, t)
238-
}
239-
if p.verbose {
240-
fmt.Println("[Profile] LLMD_PERF_SKIP set; skipping llmd-performance-baseline test")
241-
}
242-
return filtered
199+
// Shared router testcases that we also want to validate in the llm-d environment
200+
shared := []string{
201+
"chat-completions-request",
202+
"chat-completions-stress-request",
203+
"chat-completions-progressive-stress",
204+
"domain-classify",
243205
}
244-
return tests
206+
207+
// For llm-d we currently only reuse shared router testcases.
208+
// llm-d-specific HA/traffic semantics are expected to be covered in LLM-D / infra tests.
209+
return shared
245210
}
246211

247212
func (p *Profile) GetServiceConfig() framework.ServiceConfig {

e2e/testcases/llmd_auto_routing.go

Lines changed: 0 additions & 61 deletions
This file was deleted.

e2e/testcases/llmd_distributed_inference.go

Lines changed: 0 additions & 97 deletions
This file was deleted.

e2e/testcases/llmd_failover_recovery.go

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)