This commit for some reason, breaks the test runti...
# dev-help
c
This commit for some reason, breaks the test runtimes in CI 😭 https://github.com/All-Hands-AI/OpenHands/commit/e9e2c989464c94aea7b48fcb00f4b7d90df7f8cd
😱 1
Copy code
logger.debug(f'MCP action received: {action}')
    
        # Find the MCP client that has the matching tool name
        matching_client = None
        logger.debug(f'MCP clients: {mcp_clients}')
        logger.debug(f'MCP action name: {action.name}')
    
        for client in mcp_clients:
            logger.debug(f'MCP client tools: {client.tools}')
            if action.name in [tool.name for tool in client.tools]:
                matching_client = client
                break
    
        if matching_client is None:
>           raise ValueError(f'No matching MCP agent found for tool name: {action.name}')
E           ValueError: No matching MCP agent found for tool name: list_directory

openhands/mcp/utils.py:242: ValueError
=========================== rerun test summary info ============================
RERUN tests/runtime/test_mcp_action.py::test_microagent_and_one_stdio_mcp_in_config[DockerRuntime-True]
RERUN tests/runtime/test_mcp_action.py::test_filesystem_mcp_via_sse[DockerRuntime-True]
RERUN tests/runtime/test_mcp_action.py::test_both_stdio_and_sse_mcp[DockerRuntime-True]
RERUN tests/runtime/test_mcp_action.py::test_microagent_and_one_stdio_mcp_in_config[DockerRuntime-True]
RERUN tests/runtime/test_mcp_action.py::test_filesystem_mcp_via_sse[DockerRuntime-True]
RERUN tests/runtime/test_mcp_action.py::test_both_stdio_and_sse_mcp[DockerRuntime-True]
============================= slowest 10 durations =============================
79.93s call     tests/runtime/test_aci_edit.py::test_undo_edit_no_history_error[DockerRuntime-True]
79.36s call     tests/runtime/test_aci_edit.py::test_view_file[DockerRuntime-True]
79.33s call     tests/runtime/test_aci_edit.py::test_insert_with_empty_string[DockerRuntime-True]
79.16s call     tests/runtime/test_aci_edit.py::test_str_replace_error_multiple_occurrences[DockerRuntime-True]
79.08s call     tests/runtime/test_aci_edit.py::test_create_existing_file_error[DockerRuntime-True]
78.36s call     tests/runtime/test_aci_edit.py::test_str_replace_with_empty_old_str[DockerRuntime-True]
77.79s call     tests/runtime/test_aci_edit.py::test_create_with_none_file_text[DockerRuntime-True]
71.54s call     tests/runtime/test_bash.py::test_stress_long_output_with_soft_and_hard_timeout[DockerRuntime-True]
40.96s call     tests/runtime/test_browsing.py::test_browser_interactive_actions[DockerRuntime-True]
38.27s call     tests/runtime/test_browsing.py::test_browser_form_interactions[DockerRuntime-True]
=========================== short test summary info ============================
SKIPPED [1] tests/runtime/test_docker_images.py:62: This test is only for nodejs-related images
SKIPPED [1] tests/runtime/test_docker_images.py:83: This test is only for go-related images
SKIPPED [1] tests/runtime/test_ipython.py:104: This test is not working in WSL (file ownership)
SKIPPED [1] tests/runtime/test_docker_images.py:28: This test is only for python-related images
SKIPPED [1] tests/runtime/test_llm_based_edit.py:66: This test requires LLM to run.
SKIPPED [1] tests/runtime/test_llm_based_edit.py:125: This test requires LLM to run.
SKIPPED [1] tests/runtime/test_llm_based_edit.py:26: This test requires LLM to run.
SKIPPED [1] tests/runtime/test_runtime_resource.py:11: This test is flaky
SKIPPED [1] tests/runtime/test_stress_remote_runtime.py:93: This test should only be run locally, not in CI.
SKIPPED [1] tests/runtime/test_stress_remote_runtime.py:243: This test should only be run locally, not in CI.
SKIPPED [1] tests/runtime/test_stress_remote_runtime.py:373: This test should only be run locally, not in CI.
SKIPPED [1] tests/runtime/test_stress_remote_runtime.py:423: This test should only be run locally, not in CI.
FAILED tests/runtime/test_mcp_action.py::test_microagent_and_one_stdio_mcp_in_config[DockerRuntime-True] - ValueError: No matching MCP agent found for tool name: filesystem_list_directory
FAILED tests/runtime/test_mcp_action.py::test_filesystem_mcp_via_sse[DockerRuntime-True] - ValueError: No MCP clients found
FAILED tests/runtime/test_mcp_action.py::test_both_stdio_and_sse_mcp[DockerRuntime-True] - ValueError: No matching MCP agent found for tool name: list_directory
We got errors like this. @nutritious-balloon-65098 can you investigate on the main branch of All-Hands-AI/OpenHands?
l
Is it really my PR or just a coincidence? Something has changed in the runners maybe? Can you do something like re-running the tests on previous commits to check whether maybe it's the runners being the problem?
n
Uh oh! There was an unexpected error starting the job :(
c
yeah the weird thing is that every commit that happnens after that commit is broken 🥵
c
It's not the PR...
👀 1
I tried reverting it, and it's still broken
My current hypothesis is that there's some dependency that started coming in
c
ugh interesting 👀
c
Personally, I would consider marking those tests for a skip, just ... for the time of the investigation\
👍 1
to unblock us
c
@modelcontextprotocol/server-filesystem
maybe this MCP got changes 😅
5 hours ago.. sounds about right
c
• This is very consistent with upstream dependency drift in the MCP tooling the tests spin up:
◦ SSE server: supercorp/supergateway image running @modelcontextprotocol/server-filesystem.
◦ stdio server(s): started with npx @modelcontextprotocol/server-filesystem and uvx mcp-server-fetch.
• Those commands resolve “latest” versions at test time, so a change upstream can:
◦ Change the tool names (e.g., “list_directory” vs “filesystem_list_directory” or other prefixes).
◦ Break (or slow) startup/handshake so no MCP clients register (“No MCP clients found”).
Yes
c
pin the version should just fix it 🙂 expect a PR soon
l
Hooray!
must have been the payback for the double start bug requiring a huge refactor.