fix(designer): Serialize non-managed MCP server connections to connections.json (#9296) [hotfix/v5.970]#9320
Merged
Merged
Conversation
…tions.json (#9296) * Fix non-managed MCP server connections not serialized to connections.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 * fix: Improve MCP connection serialization and extend to designer-v2 - 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> * fix: Add agentMcpConnections handling to save flow in Standalone app 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> * fix: Move agentConnections merge-back outside isAgentWorkflow guard 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> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
❌ PR Validation ErrorAn error occurred while validating your PR. Please try again later or contact the maintainers. Error: API request failed with status 503 |
Contributor
🤖 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 changes needed |
| Commit Type | ✅ | No changes needed |
| Risk Level | ✅ | No changes needed |
| What & Why | ✅ | No changes needed |
| Impact of Change | ✅ | No changes needed |
| Test Plan | ✅ | No changes needed |
| Contributors | ✅ | No changes needed |
| Screenshots/Videos | ✅ | No changes needed |
This PR passes validation. The advised risk level matches the submitter’s estimate.
Last updated: Fri, 26 Jun 2026 20:13:55 GMT
Contributor
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
lambrianmsft
approved these changes
Jun 27, 2026
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.
Commit Type
Risk Level
What & Why
Cherry-pick of #9296 to
hotfix/v5.970.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.getConnectionsDataToSerializein the MCP utils serializer now handles non-ARM connection IDs (/connectionProviders/mcpclient/connections/<name>)convertConnectionsDataToReferencesnow handlesagentMcpConnectionsso MCP connections loaded from existingconnections.jsonare converted to Redux connection referencesIcM: 21000001042369
Impact of Change
InvalidAgentWorkflowvalidation error.getConnectionsDataToSerializeandconvertConnectionsDataToReferencesin MCP utils now handle additional connection ID formats.Test Plan
Contributors
@Elaina-Lee
Screenshots/Videos