chore: remove unused MCP McpUtils helpers - #32782
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 45m 22s ⏱️ Max setup 4m 11s · max shard execution 19m 33s · max shard-job elapsed before upload 22m 41s · reporting 4s 🌐 234.41 requests/attempt · 2.82 app boots/UI scenario · 17.39% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Describe your changes:
Removes two unused public methods from
McpUtilsand the four imports that became dead as a result:getJsonRpcMessageWithAuthorizationParam(McpJsonMapper, HttpServletRequest, String)readRequestBody(HttpServletRequest)Both had zero callers anywhere in the codebase (production, tests, or resource files). Their sole historical consumers —
MCPStreamableHttpServlet(1007 lines) andHttpServletSseServerTransportProvider(429 lines) — were deleted in PR #23049 (Upgrade Mcp to 0.11.2), which rewrote the MCP HTTP transport aroundOAuthHttpStatelessServerTransportProvider. The Authorization header is now extracted byAuthEnrichedMcpContextExtractorinstead of being mutated into JSON-RPC params, so these helpers were left dangling and their pattern is architecturally obsolete.History
Type of change:
High-level design:
N/A — small dead-code removal.
Tests:
Existing
McpSdkUpgradeTest(19 tests, exercisingMcpUtils.getToolPropertiesandMcpUtils.getPrompts) passes after the change.mvn compile -pl openmetadata-mcpandmvn spotless:checkare clean. No tests referenced the removed methods.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Dead Code PRs can be configured here.