fix(mcp): migrate to MCP SDK 0.18.3 JSON APIs - #16442
Open
skrcode wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dependabot/maven/io.modelcontextprotocol.sdk-mcp-0.18.3 #16442 +/- ##
==========================================================================================
Coverage ? 60.82%
Complexity ? 11769
==========================================================================================
Files ? 1953
Lines ? 89219
Branches ? 13458
==========================================================================================
Hits ? 54268
Misses ? 29389
Partials ? 5562
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…roperties (apache#16420) SpringBootConfigPropsTest intermittently fails in CI with 'expected: <prometheus> but was: <disabled>'. The module's metrics-disabling tests set the JVM System property dubbo.metrics.protocol=disabled, and Dubbo's config resolution gives System properties the highest precedence, so depending on test execution order it overrides the test's @SpringBootTest property dubbo.metrics.protocol=prometheus. Changes: - SpringBootConfigPropsTest / SpringBootMultipleConfigPropsTest: clear the leaked dubbo.metrics.protocol / dubbo.metrics.enabled System properties in @BeforeAll before DubboBootstrap.reset(), so prometheus is bound regardless of prior test state. - SysProps (dubbo-config-spring and dubbo-config-api test helpers, dubbo-test-common): make reset() also clear the recorded System properties (previously it only cleared the internal map), removing the footgun that could leak such properties between tests. (cherry picked from commit d2c4bd7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change?
This companion PR completes the MCP SDK 0.18.3 upgrade in #16342. The SDK replaced its Jackson-specific APIs with
McpJsonMapper/TypeRefand removed the deprecated string-schemaToolconstructors, leaving the Dependabot head unable to compile.The change:
ObjectMapperinstances through the SDK-providedJacksonMcpJsonMapper;TypeReftransport contract;@InjectMockspath that constructed the SSE provider with a null mapper before the test's explicit setup; anddubbo.metrics.*System properties override the Spring test's Prometheus configuration.No public API or MCP wire behavior is intentionally changed.
Verification
09795dcd58e0137c63ea5307b025893cd1aa0c48with./mvnw -pl dubbo-plugin/dubbo-mcp -DskipTests compile.SpringBootConfigPropsTestwithexpected: <prometheus> but was: <disabled>, then traced the exact defect to the maintainer-approved and merged fix: make SpringBootConfigPropsTest immune to leaked metrics System properties #16420.SpringBootConfigPropsTestandSpringBootMultipleConfigPropsTestwhile deliberately injecting-Ddubbo.metrics.protocol=disabled -Ddubbo.metrics.enabled=false; both passed with the accepted isolation fix../mvnw -T 4 -pl dubbo-plugin/dubbo-mcp -am clean install -DskipTests ...— all 53 reactor modules compiled, packaged, and installed successfully on JDK 17../mvnw -pl dubbo-plugin/dubbo-mcp clean test verify -Pjacoco,...— all 89 MCP tests passed and the JaCoCo report was generated on JDK 17.git diff --checkpassed.Checklist