-
Notifications
You must be signed in to change notification settings - Fork 569
test: add tests for either FastMCP implementation #5075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
❌ 7 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| dramatiq: TESTPATH=tests/integrations/dramatiq | ||
| falcon: TESTPATH=tests/integrations/falcon | ||
| fastapi: TESTPATH=tests/integrations/fastapi | ||
| fastmcp: TESTPATH=tests/integrations/fastmcp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The fastmcp tox environment's TESTPATH in tox.ini line 808 points to a non-existent directory, preventing test discovery.
Severity: HIGH | Confidence: 1.00
🔍 Detailed Analysis
The fastmcp tox environment's TESTPATH is incorrectly configured in tox.ini at line 808. It points to tests/integrations/fastmcp, a non-existent directory. The actual test file, test_fastmcp.py, resides in tests/integrations/mcp. This misconfiguration prevents pytest from discovering and executing any tests for the fastmcp integration suite, resulting in a silent failure where no tests are run.
💡 Suggested Fix
Update tox.ini line 808 to set fastmcp: TESTPATH=tests/integrations/mcp. This will correctly direct pytest to the location of the fastmcp integration tests.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: tox.ini#L808
Potential issue: The `fastmcp` tox environment's `TESTPATH` is incorrectly configured in
`tox.ini` at line 808. It points to `tests/integrations/fastmcp`, a non-existent
directory. The actual test file, `test_fastmcp.py`, resides in `tests/integrations/mcp`.
This misconfiguration prevents `pytest` from discovering and executing any tests for the
`fastmcp` integration suite, resulting in a silent failure where no tests are run.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put the new tests in a new tests/integrations/fastmcp directory.
If we changed the TESTPATH of the fastmcp entry to be tests/integrations/mcp, then we would be running mcp tests twice in our CI.
|
There are CI failures due to version bumps picked up by |
| if len(tool_spans) > 0: | ||
| span = tool_spans[0] | ||
| assert span["op"] == OP.MCP_SERVER | ||
| assert span["origin"] == "auto.ai.mcp" | ||
| assert span["data"][SPANDATA.MCP_METHOD_NAME] == "tools/call" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running locally I see len(tool_spans) == 0. Do we expect spans here?
The same applies to other assertions in the the suite. I think it would be good to ensure the assertions run so that we can catch regressions.
| "deps": { | ||
| "*": ["pytest-asyncio"], | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Python versioning breaks CI compatibility.
The fastmcp configuration is missing a Python version constraint. All fastmcp package versions require Python >=3.10 (visible in releases.jsonl), but the configuration doesn't specify "python": ">=3.10". This causes the GitHub Actions workflow to attempt running fastmcp tests on Python 3.8 and 3.9, which will fail since those tox environments don't exist (tox.ini only generates environments for Python 3.10+). The missing constraint also means tests might attempt to install incompatible package versions.
Issues
Closes https://linear.app/getsentry/issue/TET-1329/fastmcp-tests
Reminders
tox -e linters.feat:,fix:,ref:,meta:)