Skip to content

Commit acbbd0b

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 843079d + e799d11 commit acbbd0b

10 files changed

Lines changed: 95 additions & 32 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ benchmarks/results/*
1111
!benchmarks/results/.gitkeep
1212
.dispatcher-port-forward.pid
1313
.dispatcher-sim-port-forward.pid
14+
*.DS_Store

internal/processor/worker/executor.go

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ import (
3535
"github.com/go-logr/logr"
3636
"github.com/google/uuid"
3737

38+
"go.opentelemetry.io/otel/attribute"
39+
"go.opentelemetry.io/otel/codes"
40+
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
41+
"go.opentelemetry.io/otel/trace"
42+
3843
"github.com/llm-d/llm-d-batch-gateway/internal/processor/metrics"
3944
"github.com/llm-d/llm-d-batch-gateway/internal/shared/openai"
4045
batch_types "github.com/llm-d/llm-d-batch-gateway/internal/shared/types"
4146
"github.com/llm-d/llm-d-batch-gateway/internal/util/logging"
47+
uotel "github.com/llm-d/llm-d-batch-gateway/internal/util/otel"
4248
httpclient "github.com/llm-d/llm-d-batch-gateway/pkg/clients/http"
4349
"github.com/llm-d/llm-d-batch-gateway/pkg/clients/inference"
4450
)
@@ -180,6 +186,10 @@ func (ep *executionProgress) counts() *openai.BatchRequestCounts {
180186
// SLO expiry or SIGTERM. Its sole purpose is to let the drain phase distinguish user cancel from
181187
// SLO expiry.
182188
func (p *Processor) executeJob(ctx, sloCtx, userCancelCtx, requestAbortCtx context.Context, params *jobExecutionParams) (*openai.BatchRequestCounts, error) {
189+
// requestAbortCtx is derived from sloCtx (not ctx), so it doesn't carry
190+
// the execute-job span. Graft it so process-model spans nest correctly.
191+
requestAbortCtx = trace.ContextWithSpan(requestAbortCtx, trace.SpanFromContext(ctx))
192+
183193
logger := logr.FromContextOrDiscard(ctx)
184194
logger.V(logging.INFO).Info("Starting execution: executing job")
185195

@@ -193,6 +203,11 @@ func (p *Processor) executeJob(ctx, sloCtx, userCancelCtx, requestAbortCtx conte
193203
return nil, fmt.Errorf("failed to read model map: %w", err)
194204
}
195205

206+
uotel.SetAttr(ctx,
207+
attribute.Int(uotel.AttrModelCount, len(modelMap.SafeToModel)),
208+
attribute.Int64(uotel.AttrInputLineCount, modelMap.LineCount),
209+
)
210+
196211
// Early SLO check: if the deadline already fired before execution begins (e.g. SLO expired
197212
// during ingestion), skip dispatch entirely. No output file is written since no requests
198213
// were dispatched, but error.jsonl may already contain model_not_found entries from
@@ -279,10 +294,13 @@ func (p *Processor) executeJob(ctx, sloCtx, userCancelCtx, requestAbortCtx conte
279294
// This ensures the first real error reaches errCh before any context.Canceled
280295
// from other models whose contexts were cancelled by requestAbortFn.
281296
go func(safeModelID, modelID string) {
297+
modelCtx, modelSpan := uotel.StartSpan(requestAbortCtx, "process-model",
298+
trace.WithAttributes(semconv.GenAiRequestModel(modelID)),
299+
)
282300
var err error
283301
if p.asyncInference != nil {
284302
err = p.processModelAsync(
285-
requestAbortCtx,
303+
modelCtx,
286304
ctx,
287305
sloCtx,
288306
userCancelCtx,
@@ -295,7 +313,7 @@ func (p *Processor) executeJob(ctx, sloCtx, userCancelCtx, requestAbortCtx conte
295313
)
296314
} else {
297315
err = p.processModel(
298-
requestAbortCtx,
316+
modelCtx,
299317
ctx,
300318
sloCtx,
301319
userCancelCtx,
@@ -307,6 +325,11 @@ func (p *Processor) executeJob(ctx, sloCtx, userCancelCtx, requestAbortCtx conte
307325
tenantID,
308326
)
309327
}
328+
if err != nil && !errors.Is(err, errExpired) && !errors.Is(err, errCancelled) && !errors.Is(err, errShutdown) {
329+
modelSpan.RecordError(err)
330+
modelSpan.SetStatus(codes.Error, "process-model failed")
331+
}
332+
modelSpan.End()
310333
// Abort all sibling models when any model hits a fatal I/O error
311334
// (e.g. output file write failure). modelErr is only set for local
312335
// I/O failures — not inference errors, which are recorded normally
@@ -422,6 +445,7 @@ func (p *Processor) processModel(
422445
if err != nil {
423446
return fmt.Errorf("model setup failed: read plan for model %s: %w", modelID, err)
424447
}
448+
uotel.SetAttr(requestAbortCtx, attribute.Int(uotel.AttrRequestCount, len(entries)))
425449

426450
logger.V(logging.INFO).Info("Processing requests for a model", "numEntries", len(entries))
427451

@@ -563,6 +587,7 @@ func (p *Processor) processModelAsync(
563587
if err != nil {
564588
return fmt.Errorf("model setup failed: read plan for model %s: %w", modelID, err)
565589
}
590+
uotel.SetAttr(requestAbortCtx, attribute.Int(uotel.AttrRequestCount, len(entries)))
566591

567592
logger.V(logging.INFO).Info("Processing requests for model (async)", "numEntries", len(entries))
568593

internal/processor/worker/job_runner.go

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,17 @@ func (p *Processor) runJob(ctx context.Context, params *jobExecutionParams) {
168168
go p.heartbeat(heartbeatCtx, params.jobItem.ID, requestAbortFn)
169169

170170
// ingestion: pre-process job (rejects unregistered-model requests early)
171-
if err := p.preProcessJob(ctx, sloCtx, userCancelCtx, params.jobInfo); err != nil {
171+
ingestCtx, ingestSpan := uotel.StartSpan(ctx, "ingest-and-plan")
172+
err = p.preProcessJob(ingestCtx, sloCtx, userCancelCtx, params.jobInfo)
173+
if err != nil && !errors.Is(err, errExpired) && !errors.Is(err, errCancelled) && !errors.Is(err, errShutdown) {
174+
ingestSpan.RecordError(err)
175+
ingestSpan.SetStatus(codes.Error, "pre-process failed")
176+
}
177+
ingestSpan.End()
178+
if err != nil {
172179
// errExpired, errCancelled, and errShutdown are expected terminal states, not system errors.
173180
if !errors.Is(err, errExpired) && !errors.Is(err, errCancelled) && !errors.Is(err, errShutdown) {
174181
logger.Error(err, "Pre-processing failed")
175-
span.RecordError(err)
176-
span.SetStatus(codes.Error, "pre-process failed")
177182
}
178183
p.handleJobError(ctx, params, err)
179184
// No RecordJobProcessingDuration here: preprocessing is ingestion (parsing, plan
@@ -195,15 +200,16 @@ func (p *Processor) runJob(ctx context.Context, params *jobExecutionParams) {
195200
transitionedToInProgress = true
196201

197202
// execution: execute inference requests
203+
execCtx, execSpan := uotel.StartSpan(ctx, "execute-job")
198204
var execErr error
199-
requestCounts, execErr = p.executeJob(ctx, sloCtx, userCancelCtx, requestAbortCtx, params)
205+
requestCounts, execErr = p.executeJob(execCtx, sloCtx, userCancelCtx, requestAbortCtx, params)
206+
if execErr != nil && !errors.Is(execErr, errExpired) && !errors.Is(execErr, errCancelled) && !errors.Is(execErr, errShutdown) {
207+
execSpan.RecordError(execErr)
208+
execSpan.SetStatus(codes.Error, "execution failed")
209+
}
210+
execSpan.End()
200211
params.requestCounts = requestCounts
201212
if execErr != nil {
202-
// errExpired, errCancelled, and errShutdown are expected terminal states, not system errors.
203-
if !errors.Is(execErr, errExpired) && !errors.Is(execErr, errCancelled) && !errors.Is(execErr, errShutdown) {
204-
span.RecordError(execErr)
205-
span.SetStatus(codes.Error, "execution failed")
206-
}
207213
p.handleJobError(ctx, params, execErr)
208214
// Record processing duration for any job that ran (partially or fully).
209215
// executeJob always returns non-nil counts alongside its sentinel errors

internal/processor/worker/preprocessor.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ import (
3232
"github.com/go-logr/logr"
3333
"github.com/google/uuid"
3434

35+
"go.opentelemetry.io/otel/attribute"
36+
3537
"github.com/llm-d/llm-d-batch-gateway/internal/processor/metrics"
3638
"github.com/llm-d/llm-d-batch-gateway/internal/shared/openai"
3739
batch_types "github.com/llm-d/llm-d-batch-gateway/internal/shared/types"
3840
"github.com/llm-d/llm-d-batch-gateway/internal/util/logging"
41+
uotel "github.com/llm-d/llm-d-batch-gateway/internal/util/otel"
3942
"github.com/llm-d/llm-d-batch-gateway/pkg/clients/inference"
4043
)
4144

@@ -221,7 +224,16 @@ func (p *Processor) preProcessJob(ctx, sloCtx, userCancelCtx context.Context, jo
221224
return fmt.Errorf("write model map: %w", err)
222225
}
223226

224-
metrics.RecordPlanBuildDuration(time.Since(planBuildStart), metrics.GetSizeBucket(int(lineCount)))
227+
sizeBucket := metrics.GetSizeBucket(int(lineCount))
228+
metrics.RecordPlanBuildDuration(time.Since(planBuildStart), sizeBucket)
229+
230+
uotel.SetAttr(ctx,
231+
attribute.Int64(uotel.AttrInputLineCount, lineCount),
232+
attribute.Int(uotel.AttrModelCount, len(modelToSafe)),
233+
attribute.Int64(uotel.AttrRejectedCount, rejectedCount),
234+
attribute.String(uotel.AttrSizeBucket, sizeBucket),
235+
)
236+
225237
modelCounts := make(map[string]int, len(modelToSafe))
226238
for model, safe := range modelToSafe {
227239
modelCounts[model] = len(acc.entries[safe])

internal/util/otel/otel.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ const (
4747
AttrRequestTotal = "batch.request.total"
4848
AttrRequestCompleted = "batch.request.completed"
4949
AttrRequestFailed = "batch.request.failed"
50+
AttrModelCount = "batch.model.count"
51+
AttrRequestCount = "batch.request.count"
52+
AttrInputLineCount = "batch.input.line_count"
53+
AttrRejectedCount = "batch.input.rejected_count"
54+
AttrSizeBucket = "batch.size_bucket"
5055
)
5156

5257
// baseLoggerKey stores the logger captured before the first trace enrichment.

test/e2e/batches_test.go

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ func doTestBatchCancel(t *testing.T) {
7474
var lines []string
7575
for i := 1; i <= 5; i++ {
7676
lines = append(lines, fmt.Sprintf(
77-
`{"custom_id":"fast-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"sim-model","max_tokens":1,"messages":[{"role":"user","content":"Hi %d"}]}}`, i, i))
77+
`{"custom_id":"fast-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":1,"messages":[{"role":"user","content":"Hi %d"}]}}`, i, testSimModel, i))
7878
}
7979
for i := 1; i <= 20; i++ {
8080
lines = append(lines, fmt.Sprintf(
81-
`{"custom_id":"slow-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"sim-model","max_tokens":200,"messages":[{"role":"user","content":"Tell me a long story %d"}]}}`, i, i))
81+
`{"custom_id":"slow-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"Tell me a long story %d"}]}}`, i, testSimModel, i))
8282
}
8383
slowJSONL := strings.Join(lines, "\n")
8484
fileID := mustCreateFile(t, fmt.Sprintf("test-batch-cancel-%s.jsonl", testRunID), slowJSONL)
@@ -371,11 +371,6 @@ func doTestBatchMixedSuccessFailure(t *testing.T) {
371371
func doTestPassThroughHeaders(t *testing.T) {
372372
t.Helper()
373373

374-
// Verify processor logs contain the pass-through header names
375-
if !testKubectlAvailable {
376-
t.Skip("kubectl not available, skipping processor log verification")
377-
}
378-
379374
// Create batch with pass-through headers
380375
fileID := mustCreateFile(t, fmt.Sprintf("test-pass-through-headers-%s.jsonl", testRunID), testJSONL)
381376

@@ -405,6 +400,13 @@ func doTestPassThroughHeaders(t *testing.T) {
405400
t.Errorf("expected empty error_file_id, got %q", finalBatch.ErrorFileID)
406401
}
407402

403+
// Verify processor logs contain the pass-through header names.
404+
// Skip when kubectl is unavailable — the batch completion above already
405+
// validates the core pass-through functionality.
406+
if !testKubectlAvailable {
407+
t.Skip("kubectl not available, skipping processor log verification")
408+
}
409+
408410
out, err := exec.Command("kubectl", "logs",
409411
"-l", fmt.Sprintf("app.kubernetes.io/instance=%s,app.kubernetes.io/component=processor", testHelmRelease),
410412
"-n", testNamespace,
@@ -519,7 +521,7 @@ func doTestBatchExpiration(t *testing.T) {
519521
var blockerLines []string
520522
for i := 1; i <= 50; i++ {
521523
blockerLines = append(blockerLines, fmt.Sprintf(
522-
`{"custom_id":"blocker-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"Block %d"}]}}`, i, testModel, i))
524+
`{"custom_id":"blocker-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"Block %d"}]}}`, i, testSimModel, i))
523525
}
524526
blockerFileID := mustCreateFile(t, fmt.Sprintf("test-expiration-blocker-%s.jsonl", testRunID), strings.Join(blockerLines, "\n"))
525527
blockerBatchID := mustCreateBatch(t, blockerFileID)
@@ -545,7 +547,7 @@ func doTestBatchExpiration(t *testing.T) {
545547
var lines []string
546548
for i := 1; i <= numRequests; i++ {
547549
lines = append(lines, fmt.Sprintf(
548-
`{"custom_id":"expire-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"Expire %d"}]}}`, i, testModel, i))
550+
`{"custom_id":"expire-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"Expire %d"}]}}`, i, testSimModel, i))
549551
}
550552
fileID := mustCreateFile(t, fmt.Sprintf("test-batch-expiration-%s.jsonl", testRunID), strings.Join(lines, "\n"))
551553

@@ -604,7 +606,7 @@ func doTestCancelIdempotentRetry(t *testing.T) {
604606
var lines []string
605607
for i := 1; i <= 20; i++ {
606608
lines = append(lines, fmt.Sprintf(
607-
`{"custom_id":"retry-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testModel, i))
609+
`{"custom_id":"retry-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testSimModel, i))
608610
}
609611
fileID := mustCreateFile(t, fmt.Sprintf("test-cancel-retry-%s.jsonl", testRunID), strings.Join(lines, "\n"))
610612
batchID := mustCreateBatch(t, fileID)
@@ -740,11 +742,11 @@ func doTestProgressPolling(t *testing.T) {
740742
var lines []string
741743
for i := 1; i <= 5; i++ {
742744
lines = append(lines, fmt.Sprintf(
743-
`{"custom_id":"fast-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":1,"messages":[{"role":"user","content":"fast %d"}]}}`, i, testModel, i))
745+
`{"custom_id":"fast-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":1,"messages":[{"role":"user","content":"fast %d"}]}}`, i, testSimModel, i))
744746
}
745747
for i := 1; i <= 15; i++ {
746748
lines = append(lines, fmt.Sprintf(
747-
`{"custom_id":"slow-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testModel, i))
749+
`{"custom_id":"slow-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testSimModel, i))
748750
}
749751
fileID := mustCreateFile(t, fmt.Sprintf("test-progress-%s.jsonl", testRunID), strings.Join(lines, "\n"))
750752
batchID := mustCreateBatch(t, fileID)

test/e2e/e2e_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ var (
3737
testHelmRelease = getEnvOrDefault("TEST_HELM_RELEASE", "batch-gateway")
3838
testPostgresqlRelease = getEnvOrDefault("TEST_POSTGRESQL_RELEASE", "postgresql")
3939
testRedisRelease = getEnvOrDefault("TEST_REDIS_RELEASE", "redis")
40+
testDBPod = getEnvOrDefault("TEST_DB_POD", "")
4041

4142
// testDBClientType and testExchangeClientType are detected from Helm
4243
// releases at startup; see detectDBClientType / detectExchangeClientType.
@@ -46,8 +47,14 @@ var (
4647
testRunID = fmt.Sprintf("%d", time.Now().UnixNano())
4748

4849
// testModel is the model name used in batch input; configurable via TEST_MODEL env var.
49-
testModel = getEnvOrDefault("TEST_MODEL", "sim-model")
50-
testModelB = getEnvOrDefault("TEST_MODEL_B", "sim-model-b")
50+
testModel = getEnvOrDefault("TEST_MODEL", "sim-model")
51+
testModelB = getEnvOrDefault("TEST_MODEL_B", "sim-model-b")
52+
// testSimModel is the model name used in timing-dependent tests that require
53+
// controlled latency (cancel, expiration, progress polling, orphan recovery,
54+
// graceful shutdown). It should always point to a simulator with predictable
55+
// inter-token latency. Defaults to testModel for dev-deploy where all models
56+
// are simulated.
57+
testSimModel = getEnvOrDefault("TEST_SIM_MODEL", testModel)
5158
testModel429 = getEnvOrDefault("TEST_MODEL_429", "sim-model-429")
5259
testModelAlwaysFail = getEnvOrDefault("TEST_MODEL_ALWAYS_FAIL", "sim-model-always-fail")
5360
testModelAIMD = getEnvOrDefault("TEST_MODEL_AIMD", "sim-model-aimd")

test/e2e/gc_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ func expireInDB(t *testing.T, table, id string) {
4747
func expireInPostgresql(t *testing.T, table, id string) {
4848
t.Helper()
4949

50+
podName := testDBPod
51+
if podName == "" {
52+
podName = fmt.Sprintf("%s-0", testPostgresqlRelease)
53+
}
54+
5055
sql := fmt.Sprintf("UPDATE %s SET expiry = 1 WHERE id = '%s'", table, id)
5156
cmd := fmt.Sprintf(`PGPASSWORD="$(cat "$POSTGRES_PASSWORD_FILE")" psql -U postgres -d postgres -c %q`, sql)
5257
out, err := exec.Command("kubectl", "exec",
53-
fmt.Sprintf("%s-0", testPostgresqlRelease),
58+
podName,
5459
"-n", testNamespace,
5560
"--", "bash", "-c", cmd,
5661
).CombinedOutput()

test/e2e/orphan_recovery_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func doTestHardCrashOrphanRecovery(t *testing.T) {
6868
var lines []string
6969
for i := 1; i <= 50; i++ {
7070
lines = append(lines, fmt.Sprintf(
71-
`{"custom_id":"orphan-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testModel, i))
71+
`{"custom_id":"orphan-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testSimModel, i))
7272
}
7373
fileID := mustCreateFile(t, fmt.Sprintf("test-orphan-recovery-%s.jsonl", testRunID), strings.Join(lines, "\n"))
7474
batchID := mustCreateBatch(t, fileID)
@@ -115,11 +115,11 @@ func doTestCancellingOrphanRecovery(t *testing.T) {
115115
var lines []string
116116
for i := 1; i <= 5; i++ {
117117
lines = append(lines, fmt.Sprintf(
118-
`{"custom_id":"cancel-orphan-fast-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":1,"messages":[{"role":"user","content":"Hi %d"}]}}`, i, testModel, i))
118+
`{"custom_id":"cancel-orphan-fast-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":1,"messages":[{"role":"user","content":"Hi %d"}]}}`, i, testSimModel, i))
119119
}
120120
for i := 1; i <= 20; i++ {
121121
lines = append(lines, fmt.Sprintf(
122-
`{"custom_id":"cancel-orphan-slow-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testModel, i))
122+
`{"custom_id":"cancel-orphan-slow-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testSimModel, i))
123123
}
124124
fileID := mustCreateFile(t, fmt.Sprintf("test-cancelling-orphan-%s.jsonl", testRunID), strings.Join(lines, "\n"))
125125
batchID := mustCreateBatch(t, fileID)

test/e2e/processor_graceful_shutdown_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func doTestPodDeleteMidJob(t *testing.T) {
6262
var lines []string
6363
for i := 1; i <= 10; i++ {
6464
lines = append(lines, fmt.Sprintf(
65-
`{"custom_id":"pod-del-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testModel, i))
65+
`{"custom_id":"pod-del-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testSimModel, i))
6666
}
6767
fileID := mustCreateFile(t, fmt.Sprintf("test-pod-delete-%s.jsonl", testRunID), strings.Join(lines, "\n"))
6868
batchID := mustCreateBatch(t, fileID)
@@ -124,7 +124,7 @@ func doTestRollingRestartReEnqueue(t *testing.T) {
124124
var lines []string
125125
for i := 1; i <= 10; i++ {
126126
lines = append(lines, fmt.Sprintf(
127-
`{"custom_id":"restart-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testModel, i))
127+
`{"custom_id":"restart-%d","method":"POST","url":"/v1/chat/completions","body":{"model":"%s","max_tokens":200,"messages":[{"role":"user","content":"slow %d"}]}}`, i, testSimModel, i))
128128
}
129129
fileID := mustCreateFile(t, fmt.Sprintf("test-rolling-restart-%s.jsonl", testRunID), strings.Join(lines, "\n"))
130130
batchID := mustCreateBatch(t, fileID)

0 commit comments

Comments
 (0)