Repository navigation
feat(go-api): migrate MCP server detail and download API to Go - #16113
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a ChangesMCP Server GET Endpoint
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant GetMCPServer
participant MCPService
participant DAO
Client->>Router: GET /api/v1/mcp/servers/:mcp_id[?mode=download]
Router->>GetMCPServer: dispatch
GetMCPServer->>GetMCPServer: authenticate user, extract mcp_id
alt mode == download
GetMCPServer->>MCPService: ExportMCPServer(userID, mcpID)
MCPService->>DAO: GetMCPServer(tenantID, mcpID)
DAO-->>MCPService: entity.MCPServer
MCPService-->>GetMCPServer: ExportMCPServerResponse
GetMCPServer-->>Client: HTTP 200 + export JSON
else default
GetMCPServer->>MCPService: GetMCPServer(tenantID, mcpID)
MCPService->>DAO: GetMCPServer(tenantID, mcpID)
DAO-->>MCPService: entity.MCPServer or not-found
MCPService-->>GetMCPServer: MCPServer or CodeDataError
GetMCPServer-->>Client: HTTP 200 + MCPServer JSON
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16113 +/- ##
==========================================
- Coverage 94.56% 93.16% -1.40%
==========================================
Files 10 10
Lines 717 717
Branches 118 118
==========================================
- Hits 678 668 -10
- Misses 25 29 +4
- Partials 14 20 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
LGTM |
What problem does this PR solve?
GET /api/v1/mcp/servers/:mcp_id(supporting?mode=downloadquery parameter).How to Test
curlrequests between Python (port 9380) and Go (port 9384) for/api/v1/mcp/servers/<mcp_id>in both normal and download mode to ensure 100% key-value parity.