Treat zero-byte rpc-messages.jsonl as an MCP telemetry failure#33358
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR ensures MCP telemetry capture failures are surfaced as workflow failures by treating a zero-byte rpc-messages.jsonl as an error instead of a no-op.
Changes:
- Update
parse_mcp_gateway_log.cjsto fail the run with anERR_SYSTEM-prefixed message whenrpc-messages.jsonlexists but is empty. - Add a unit test validating the zero-byte failure path and ensuring the step summary isn’t written.
- Adjust the Datadog
DD_APPLICATION_KEYheader interpolation inmcp-inspector.lock.yml(now referencingDD_APP_KEY).
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/parse_mcp_gateway_log.cjs | Fails fast when rpc-messages.jsonl is present but empty to detect telemetry/capability failures. |
| actions/setup/js/parse_mcp_gateway_log.test.cjs | Adds coverage for the new zero-byte failure behavior. |
| .github/workflows/mcp-inspector.lock.yml | Updates Datadog header env-var reference (unrelated to MCP telemetry parsing). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 2
| "headers": { | ||
| "DD_API_KEY": "\${DD_API_KEY}", | ||
| "DD_APPLICATION_KEY": "\${DD_APPLICATION_KEY}", | ||
| "DD_APPLICATION_KEY": "\${DD_APP_KEY}", | ||
| "DD_SITE": "\${DD_SITE}" |
| "headers": { | ||
| "DD_API_KEY": "\${DD_API_KEY}", | ||
| "DD_APPLICATION_KEY": "\${DD_APPLICATION_KEY}", | ||
| "DD_APPLICATION_KEY": "\${DD_APP_KEY}", |
|
@copilot review all comments and reviews |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
The |
|
|
…s.jsonl permission denied The DIFC proxy and CLI proxy containers were running as root (no --user flag), creating rpc-messages.jsonl as root-owned in /tmp/gh-aw/mcp-logs/. When the MCP Gateway container (running as runner UID 1001) tried to open the same file, it got 'permission denied', leaving the file at 0 bytes and triggering a core.setFailed() in the parse step (added in github#33358). Fix: add --user "$(id -u):$(id -g)" to both proxy docker run commands, matching the MCP Gateway's container user. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A zero-byte
rpc-messages.jsonl(MCP server never started, crashed before any RPC, or capture pipeline broke) was silently treated as a non-event, keeping runs green despite a real capability failure.Changes
parse_mcp_gateway_log.cjs— after readingrpc-messages.jsonl, guard on zero length and callcore.setFailed()with anERR_SYSTEM-prefixed message before returning; replaces the silent pass-through:parse_mcp_gateway_log.test.cjs— adds a test covering the zero-byte path, assertingsetFailedis called with theERR_SYSTEMmessage andsummary.writeis never reached.pr-sous-chef: request to update branch (run id: 26122348307)