Skip to content

Commit 99366f1

Browse files
committed
Strip the diagnostics (Envoy access log, failure/end-of-spec dumps, dumpEnvoyClusters)
Signed-off-by: Revital Sur <eres@il.ibm.com>
1 parent 33e108a commit 99366f1

2 files changed

Lines changed: 11 additions & 54 deletions

File tree

test/coordinator/e2e/coordinator/coordinator_test.go

Lines changed: 11 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,17 @@ func runCoordinatorPipeline(body []byte, expectedSteps []string, expectedImages
127127
if !ginkgo.CurrentSpecReport().Failed() && !printCoordinatorLogs {
128128
return
129129
}
130-
dumpDeploymentLogs(nsName, "llm-d-coordinator", "coordinator")
131-
dumpDeploymentLogs(nsName, eppName+"-encode", "epp")
132-
dumpDeploymentLogs(nsName, eppName+"-prefill", "epp")
133-
dumpDeploymentLogs(nsName, eppName+"-decode", "epp")
134-
dumpDeploymentLogs(nsName, "envoy", "envoy")
135-
dumpEnvoyClusters(nsName)
130+
args := []string{"logs", "deployment/llm-d-coordinator",
131+
"-c", "coordinator", "--namespace=" + nsName}
132+
if k8sContext != "" {
133+
args = append(args, "--context="+k8sContext)
134+
}
135+
out, err := exec.Command("kubectl", args...).CombinedOutput()
136+
if err != nil {
137+
fmt.Fprintf(ginkgo.GinkgoWriter, "\n--- coordinator logs (kubectl error: %v) ---\n%s\n---\n", err, string(out))
138+
} else {
139+
fmt.Fprintf(ginkgo.GinkgoWriter, "\n--- coordinator logs ---\n%s\n---\n", string(out))
140+
}
136141
})
137142

138143
// Pools first so each EPP can resolve its --pool-name.
@@ -175,47 +180,6 @@ func runCoordinatorPipeline(body []byte, expectedSteps []string, expectedImages
175180
"coordinator returned non-200: body=%s", string(raw))
176181
gomega.Expect(raw).NotTo(gomega.BeEmpty(), "coordinator returned empty body")
177182
verifyCoordinatorSteps(nsName, expectedSteps, expectedImages, true, true)
178-
179-
// Diagnostic: dump the coordinator logs once the request has completed. The
180-
// per-step timestamps show when the request reached the coordinator (relative
181-
// to when it was sent) and how long each pipeline step took, so we can tell
182-
// late-arrival (gateway) from slow processing (pipeline). Also dump Envoy's
183-
// access log so each request's gateway view (code/flags/cluster/upstream) is
184-
// visible even on green runs, as a baseline to compare against a failure.
185-
dumpDeploymentLogs(nsName, "llm-d-coordinator", "coordinator")
186-
dumpDeploymentLogs(nsName, "envoy", "envoy")
187-
}
188-
189-
// dumpDeploymentLogs writes a deployment's container logs to the Ginkgo output.
190-
// A kubectl error is reported inline rather than failing the spec.
191-
func dumpDeploymentLogs(nsName, deployment, container string) {
192-
args := []string{"logs", "deployment/" + deployment, "-c", container, "--namespace=" + nsName}
193-
if k8sContext != "" {
194-
args = append(args, "--context="+k8sContext)
195-
}
196-
out, err := exec.Command("kubectl", args...).CombinedOutput()
197-
if err != nil {
198-
fmt.Fprintf(ginkgo.GinkgoWriter, "\n--- %s logs (kubectl error: %v) ---\n%s\n---\n", deployment, err, string(out))
199-
return
200-
}
201-
fmt.Fprintf(ginkgo.GinkgoWriter, "\n--- %s logs ---\n%s\n---\n", deployment, string(out))
202-
}
203-
204-
// dumpEnvoyClusters writes Envoy's admin /clusters (resolved endpoints and health
205-
// per cluster) to the Ginkgo output. Best-effort; yields nothing if the envoy
206-
// image lacks a usable HTTP client.
207-
func dumpEnvoyClusters(nsName string) {
208-
args := []string{"exec", "deployment/envoy", "-c", "envoy", "--namespace=" + nsName}
209-
if k8sContext != "" {
210-
args = append(args, "--context="+k8sContext)
211-
}
212-
args = append(args, "--", "curl", "-s", "http://localhost:19000/clusters")
213-
out, err := exec.Command("kubectl", args...).CombinedOutput()
214-
if err != nil {
215-
fmt.Fprintf(ginkgo.GinkgoWriter, "\n--- envoy /clusters (kubectl error: %v) ---\n%s\n---\n", err, string(out))
216-
return
217-
}
218-
fmt.Fprintf(ginkgo.GinkgoWriter, "\n--- envoy /clusters ---\n%s\n---\n", string(out))
219183
}
220184

221185
// verifyCoordinatorSteps fetches the coordinator pod logs and asserts that

test/coordinator/e2e/coordinator/testdata/envoy.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ data:
8080
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
8181
stat_prefix: http-8081
8282
preserve_external_request_id: true
83-
access_log:
84-
- name: envoy.access_loggers.stdout
85-
typed_config:
86-
"@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
87-
log_format:
88-
text_format_source:
89-
inline_string: "[envoy] %REQ(:METHOD)% %REQ(:PATH)% code=%RESPONSE_CODE% flags=%RESPONSE_FLAGS% cluster=%UPSTREAM_CLUSTER% upstream=%UPSTREAM_HOST% epp-phase=%REQ(EPP-PHASE)% id=%REQ(X-REQUEST-ID)% dur=%DURATION%\n"
9083
route_config:
9184
name: vllm
9285
virtual_hosts:

0 commit comments

Comments
 (0)