fallintoplace opened a new pull request, #40814:
URL: https://github.com/apache/superset/pull/40814

   ### Summary
   
   Fix the MCP stdio entry point so the `click.echo` monkey-patch calls the 
saved original function instead of calling the patched attribute again.
   
   ### Root cause
   
   In stdio mode, `superset.mcp_service.__main__` replaced `click.echo` with a 
lambda that called `click.echo` again. After assignment, that name points back 
to the lambda itself, so normal Click output can fail instead of being 
redirected to stderr.
   
   ### Changes
   
   - Save `click.echo` before patching it, matching the existing `click.secho` 
pattern.
   - Add a focused regression test that loads the stdio entry point with 
lightweight stubs and verifies `click.echo` and `click.secho` write to stderr 
without writing to stdout.
   
   ### Checks
   
   - `uv run --no-project --with ruff ruff check --config pyproject.toml 
superset/mcp_service/__main__.py tests/unit_tests/test_mcp_stdio_entrypoint.py`
   - Standalone stdio redirection check with `click` and stubbed MCP imports
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to