Skip to content

Conversation

@CH3CHO
Copy link
Collaborator

@CH3CHO CH3CHO commented May 9, 2025

Ⅰ. Describe what this PR did

  1. Introduce interfaces of McpServerProvider and McpRouteProviderAware and utilize them for config collection.
  2. Support discovering mcp-sse type of MCP Servers from Nacos 3.x.
  3. Remove the request path rewriting function for SSE upstreams.
  4. Fix the incomplete ServiceKey used in registry generated DestinationRules, causing only one DestinationRule of consistent hash LB is published even when multiple mcp-sse servers are available.
  5. Support configuring MatchRules using annotations on Ingress resources.
    • higress.io/mcp-server
    • higress.io/mcp-server-match-rule-domains
    • higress.io/mcp-server-match-rule-type
    • higress.io/mcp-server-match-rule-value
    • higress.io/mcp-server-upstream-type
    • higress.io/mcp-server-enable-path-rewrite
    • higress.io/mcp-server-path-rewrite-prefix
    • Sample:
      image

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented May 9, 2025

Codecov Report

Attention: Patch coverage is 61.94030% with 51 lines in your changes missing coverage. Please review.

Project coverage is 45.98%. Comparing base (ef31e09) to head (0440194).
Report is 513 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ingress/kube/configmap/mcp_server.go 32.43% 24 Missing and 1 partial ⚠️
pkg/ingress/config/ingress_config.go 5.26% 18 Missing ⚠️
pkg/ingress/kube/configmap/controller.go 0.00% 4 Missing ⚠️
pkg/ingress/kube/annotations/mcpserver.go 93.75% 2 Missing and 1 partial ⚠️
pkg/ingress/kube/annotations/annotations.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2207       +/-   ##
===========================================
+ Coverage   35.91%   45.98%   +10.07%     
===========================================
  Files          69       81       +12     
  Lines       11576    13010     +1434     
===========================================
+ Hits         4157     5983     +1826     
+ Misses       7104     6680      -424     
- Partials      315      347       +32     
Files with missing lines Coverage Δ
pkg/ingress/kube/configmap/global.go 27.35% <ø> (ø)
pkg/ingress/kube/configmap/gzip.go 45.29% <ø> (ø)
pkg/ingress/kube/configmap/tracing.go 2.17% <ø> (-0.35%) ⬇️
pkg/ingress/kube/mcpserver/provider.go 100.00% <100.00%> (ø)
pkg/ingress/kube/annotations/annotations.go 30.69% <0.00%> (-0.94%) ⬇️
pkg/ingress/kube/annotations/mcpserver.go 93.75% <93.75%> (ø)
pkg/ingress/kube/configmap/controller.go 0.00% <0.00%> (ø)
pkg/ingress/config/ingress_config.go 12.63% <5.26%> (-1.25%) ⬇️
pkg/ingress/kube/configmap/mcp_server.go 87.36% <32.43%> (ø)

... and 71 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CH3CHO CH3CHO requested a review from rinfx as a code owner May 10, 2025 05:54
@CH3CHO CH3CHO force-pushed the feat/mcp-annotations branch from e73dbab to e0fb28b Compare May 10, 2025 08:58
CH3CHO added 5 commits May 22, 2025 09:53
1. Introduce interfaces of McpServerProvider and McpRouteProviderAware and utilize them for config collection.
2. Support configuring MatchRules using annotations on Ingress resources.
@CH3CHO CH3CHO force-pushed the feat/mcp-annotations branch from d1fffa2 to d33fecb Compare May 22, 2025 02:02
@CH3CHO CH3CHO force-pushed the feat/mcp-annotations branch from d33fecb to a25987e Compare May 22, 2025 02:21
Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johnlanni
Copy link
Collaborator

cc @Erica177 @slievrly

@johnlanni johnlanni merged commit ffcf5df into alibaba:main May 26, 2025
12 checks passed
ink-hz pushed a commit to ink-hz/higress-ai-capability-auth that referenced this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants