fix(designer): Serialize non-managed MCP server connections to connections.json#9296
Conversation
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No change needed |
| Commit Type | ✅ | No change needed |
| Risk Level | ✅ | No change needed |
| What & Why | ✅ | No change needed |
| Impact of Change | ✅ | No change needed |
| Test Plan | ✅ | Unit tests are present in the diff |
| Contributors | Optional: add contributors if applicable | |
| Screenshots/Videos | ✅ | No change needed |
Overall: this PR passes review for title/body compliance. The advised risk level remains Medium, so there is no higher-risk adjustment needed.
Last updated: Fri, 19 Jun 2026 23:06:02 GMT
There was a problem hiding this comment.
Pull request overview
This PR fixes a deployment/validation gap in the MCP workflow serialization path by ensuring non-managed MCP client connections (non-ARM connection IDs like /connectionProviders/mcpclient/connections/<name>) are included in the serialized connections.json payload under agentMcpConnections, preventing validate API failures due to missing MCP connection entries.
Changes:
- Updated MCP workflow serialization to detect non-ARM MCP connections and serialize them into
agentMcpConnectionsby fetching details viaConnectionService().getConnection(). - Extended
convertConnectionsDataToReferencesto convertagentMcpConnectionsentries into Redux connection references. - Added unit tests covering
agentMcpConnectionsconversion scenarios.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libs/designer/src/lib/core/mcp/utils/serializer.ts | Adds serialization support for non-ARM MCP connections into agentMcpConnections using ConnectionService().getConnection(). |
| libs/designer/src/lib/core/mcp/utils/helper.ts | Adds agentMcpConnections → connection references conversion so MCP connections initialize correctly in Redux state. |
| libs/designer/src/lib/core/mcp/utils/test/helper.spec.ts | Adds unit tests validating convertConnectionsDataToReferences behavior for agentMcpConnections. |
AbodeSaafan
left a comment
There was a problem hiding this comment.
from a non ux engineer, it looks fine. We should get css to also test and confirm but we had a clear repro. Only concern is if we should get the "apikey" vs "key" fix in with this as well to fully unblock the feature
Communicated offline, this fix (apikey and key fix) has been verified here - that the fix had been merged. |
…json Non-managed identity MCP server connections (auth types None, Basic, Client certificate, etc.) were not being included in the workflow deployment payload, causing the validate API to fail. Root cause: getConnectionsDataToSerialize only handled ARM resource IDs via isArmResourceId check. Non-managed MCP connections use non-ARM IDs (/connectionProviders/mcpclient/connections/<name>) and were skipped. Fix: - serializer.ts: Detect MCP connections and fetch their data via ConnectionService, constructing agentMcpConnections entries - helper.ts: Add agentMcpConnections handling to convertConnectionsDataToReferences for proper state initialization - Added unit tests for the new agentMcpConnections reference conversion
- Apply same agentMcpConnections fix to designer-v2 serializer and helper - Tighten isMcpConnectionReference to exact match instead of loose includes() - Add error logging in getMcpConnectionData instead of silent catch - Remove unused _referenceKey parameter from getMcpConnectionData - Add unit tests for isMcpConnectionReference and convertConnectionsDataToReferences Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MCP connections (connectionProviders/mcpclient/) had no handler in the save flow's if/else chain, causing them to be silently dropped during save/validate. This adds the missing handler to both laDesigner.tsx and laDesignerV2.tsx, plus adds hasNewMcpConnectionKeys detection to getConnectionsToUpdate in v2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The save flow deletes agent connections from connectionsData unconditionally when processing connectionReferences, but the merge-back step was inside an isAgentWorkflow() check. For "Stateful" workflows with Agent actions (kind != "agentic"/"agent"), agent connections were deleted and never restored, causing them to be permanently lost from connections.json on the next deploy. Move the agentConnections merge to run unconditionally (matching agentMcpConnections and serviceProviderConnections behavior). Only the MSI role assignment logic remains guarded by isAgentWorkflow(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3bb72cc to
877c3e0
Compare
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
Commit Type
Risk Level
What & Why
Non-managed MCP server connections (auth types: None, Basic, Client Certificate) were not included in the deployment payload's
connections.json, causing the validate API to fail withInvalidAgentWorkflow. Managed MCP connections (e.g., Kusto Query MCP Server) worked fine because they use ARM resource IDs.getConnectionsDataToSerializein the MCP utils serializer only processed ARM resource IDs viaisArmResourceId(). Non-managed MCP connections use non-ARM IDs (/connectionProviders/mcpclient/connections/<name>) and were skipped entirely. Additionally,convertConnectionsDataToReferencesdid not handleagentMcpConnections, so MCP connections loaded from existingconnections.jsonwere never converted to Redux connection references.IcM: 21000001042369
Impact of Change
connections.json, fixing workflow validation failures.isMcpConnectionReference()utility available in both designer v1 and v2 serializers.Test Plan
Contributors
Screenshots/Videos