aminghadersohi opened a new pull request, #41920: URL: https://github.com/apache/superset/pull/41920
## SUMMARY `update_dashboard` in the MCP service called `ctx.info(...)` without `await` inside a sync tool function. `fastmcp.Context.info` is an async method, so these calls created unawaited coroutines and the log lines were silently dropped instead of being emitted. Made the tool async and awaited both `ctx.info` calls, matching the pattern used by every other MCP tool in the service. A repo-wide grep for the same pattern (sync `def` tool functions calling `ctx.info/debug/warning/error` without `await`) turned up no other occurrences. ## BEFORE/AFTER Before: the two `ctx.info(...)` calls in `update_dashboard` created coroutines that were never awaited or scheduled, so nothing was logged to the MCP client. After: both calls are awaited and the log lines are emitted as expected. ## TESTING INSTRUCTIONS - `pytest tests/unit_tests/mcp_service/dashboard/tool/test_update_dashboard.py` - Added `test_ctx_info_is_awaited`, which patches `fastmcp.Context.info` with an `AsyncMock` and asserts it is awaited exactly twice with the expected messages — this test fails without the fix. ## ADDITIONAL INFORMATION - [x] Has associated tests -- 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]
