da-daken commented on code in PR #1475:
URL: https://github.com/apache/flink-agents/pull/1475#discussion_r4802068149
##########
runtime/src/main/java/org/apache/flink/agents/runtime/JavaMCPResourceDiscovery.java:
##########
@@ -83,6 +85,18 @@ private static void discoverServer(
Map<String, String> toolOwners,
Map<String, String> promptOwners)
throws Exception {
+ if (provider instanceof JavaResourceProvider) {
+ ResourceDescriptor descriptor = ((JavaResourceProvider)
provider).getDescriptor();
+ if (ResourceName.JAVA_MCP_SERVER.equals(descriptor.getClazz())
+ && Runtime.version().feature() < 17) {
+ throw new UnsupportedOperationException(
+ "MCP server '"
+ + serverName
+ + "' uses the bundled Java MCP implementation,
which requires"
+ + " JDK 17+. Run this job on JDK 17+ or
declare a Python MCP"
+ + " server.");
Review Comment:
Thanks for the review. Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]