Repository navigation
fix(wanwu): keep legacy MCP nodes on SSE when transport is empty - #8
Open
ThisIsReed wants to merge 1 commit into
Open
ThisIsReed wants to merge 1 commit into
ThisIsReed wants to merge 1 commit into
Conversation
Historical workflow MCP nodes stored only serverUrl and implicitly used SSE. Streamable HTTP support rejects an omitted or empty transport while building the node, so existing drafts and published versions fail before any tool call. Treat an empty transport as SSE, and keep explicit SSE, streamable, and unknown protocols unchanged.
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.
What type of PR is this?
fix: A bug fix
Check the PR title.
No usage-level documentation is required. Existing workflows keep working without re-saving each MCP node.
(Optional) Translate the PR title into Chinese.
修复旧工作流 MCP 节点缺少 transport 时无法运行的问题
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
Adding streamable HTTP (
a1f5a791,feat(mcp): mcp support streamable http) madeConfig.Buildrequiretransportto besseorstreamable. Older canvas nodes only storedserverUrland a tool name, and the runtime always used SSE. After the upgrade, an omitted field or an empty string reaches the default branch and node creation fails withtransport not supportbefore any tool call.The stored canvas is what draft test runs, published versions, resume, and single-node debug all compile. Re-selecting one node in the editor does not rewrite other old nodes in the same workflow. This change restores the previous SSE behavior when
transportis missing or empty. Explicitssestill uses the SSE URL, explicitstreamablestill uses the streamable URL, and an unknown protocol still returnstransport not support. A selected protocol with no URL, or a node with no tool name, still returns a specific error.A workflow containing one legacy node and one explicit SSE node now builds as one graph, and both nodes complete an SSE handshake and tool call against a local echo MCP server.
zh(optional):
支持 streamable HTTP 之后,节点构建要求
transport为sse或streamable。旧画布只保存serverUrl和工具名,运行时原本固定走 SSE。升级后字段缺失或为空会在构建阶段报transport not support。草稿试运行、已发布版本、恢复执行和单节点调试都从已保存画布重新构建,因此只重新选择其中一个节点不能修复同一工作流里的其他旧节点。本变更在transport缺失或为空时恢复 SSE;显式sse、streamable和未知协议的行为保持不变。(Optional) Which issue(s) this PR fixes:
None. No equivalent open issue or pull request was found.
Test plan
go test ./domain/workflow/internal/nodes/wanwu-mcp/covers omitted transport, empty transport, explicit SSE, explicit streamable, unknown protocol, missing URL, and missing tool name. SSE and streamable cases call a local echo MCP server and check the tool result.go test -run TestMixedLegacyAndExplicitSSEMCPWorkflow ./domain/workflow/internal/canvas/adaptor/builds one canvas with a legacy node and an explicit SSE node, runs the workflow, and checks both node results.transport not supporton unmodifieddev.