fix(client): surface streamable HTTP request failures#2523
fix(client): surface streamable HTTP request failures#2523Genmin wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
|
Pushed a small CI cleanup after inspecting the failed jobs. The original regression test covered previously excluded ClientSessionGroup cleanup/error paths, so I narrowed those coverage pragmas and reran the CI-equivalent coverage checks locally.\n\nValidation run after the update:\n- uv run pytest tests/client/test_notification_response.py tests/client/test_session_group.py -q\n- uv run ruff format --check src/mcp/client/streamable_http.py src/mcp/client/session_group.py tests/client/test_notification_response.py tests/client/test_session_group.py\n- uv run ruff check src/mcp/client/streamable_http.py src/mcp/client/session_group.py tests/client/test_notification_response.py tests/client/test_session_group.py\n- uv run pyright src/mcp/client/streamable_http.py src/mcp/client/session_group.py tests/client/test_notification_response.py tests/client/test_session_group.py\n- uv run --frozen --no-sync coverage run -m pytest -n auto && uv run --frozen --no-sync coverage combine || true; uv run --frozen --no-sync coverage report && uv run --frozen --no-sync strict-no-cover\n- UV_PROJECT_ENVIRONMENT=.venv-py314 uv run --python 3.14 pytest tests/client/test_notification_response.py::test_transport_error_sends_jsonrpc_error tests/client/test_session_group.py::test_client_session_group_streamable_http_connect_error_is_catchable -q |
Fixes #915
Summary
streamable_http_clientuse andClientSessionGroup.connect_to_server()Validation
uv run pytest tests/client/test_notification_response.py::test_transport_error_sends_jsonrpc_error tests/client/test_notification_response.py::test_transport_error_on_notification_does_not_crash_transport tests/client/test_session_group.py::test_client_session_group_streamable_http_connect_error_is_catchable -quv run pytest tests/client/test_notification_response.py tests/client/test_session_group.py -quv run pytest tests/shared/test_streamable_http.py::test_streamable_http_client_basic_connection tests/shared/test_streamable_http.py::test_streamable_http_client_error_handling tests/client/test_transport_stream_cleanup.py::test_streamable_http_client_closes_all_streams_on_exit -quv run ruff format --check src/mcp/client/streamable_http.py tests/client/test_notification_response.py tests/client/test_session_group.pyuv run ruff check src/mcp/client/streamable_http.py tests/client/test_notification_response.py tests/client/test_session_group.pyuv run pyright src/mcp/client/streamable_http.py tests/client/test_notification_response.py tests/client/test_session_group.pygit diff --check