Skip to content

Add server version to banner#3076

Merged
jlowin merged 1 commit intoPrefectHQ:mainfrom
richardkmichael:banner-with-version
Feb 4, 2026
Merged

Add server version to banner#3076
jlowin merged 1 commit intoPrefectHQ:mainfrom
richardkmichael:banner-with-version

Conversation

@richardkmichael
Copy link
Copy Markdown
Contributor

Description

Add the server version, if set, to the banner.

I considered separate line, but at a glance that could be confused for the FastMCP version, and the banner looks quite nice and minimal as-is.

Contributors Checklist

  • My change closes Display server version on banner #3075
  • I have followed the repository's development workflow
  • I have tested my changes manually and by adding relevant tests
  • I have performed all required documentation updates

Review Checklist

  • I have self-reviewed my changes
  • My Pull Request is ready for review

@marvin-context-protocol marvin-context-protocol Bot added enhancement Improvement to existing functionality. For issues and smaller PR improvements. cli Related to FastMCP CLI commands (run, dev, install) or CLI functionality. labels Feb 4, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 4, 2026

Walkthrough

The change modifies the log_server_banner function in src/fastmcp/utilities/cli.py to conditionally display server version information in the banner output. The function now constructs a server_info string by starting with server.name and appending the server version when available, rather than displaying only the server name. This display modification affects the Server row in the logging output without altering control flow or surrounding logging logic.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add server version to banner' clearly and concisely describes the main change in the pull request.
Description check ✅ Passed The description provides clear context about the change and includes all required checklist items completed.
Linked Issues check ✅ Passed The PR implementation meets the requirement to display the server version on the banner when set, addressing issue #3075's request for showing server version information.
Out of Scope Changes check ✅ Passed All changes are focused on adding server version display to the banner as specified in issue #3075; no unrelated modifications were introduced.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@marvin-context-protocol
Copy link
Copy Markdown
Contributor

marvin-context-protocol Bot commented Feb 4, 2026

Test Failure Analysis

Summary: The Windows test run timed out during test_init_defaults in tests/server/auth/providers/test_github.py. This is unrelated to the PR changes, which only modify banner display logic.

Root Cause: The test timeout occurs during DiskStore initialization when creating the OAuth proxy provider. The stack trace shows the test hung while initializing the diskcache database in proxy.py:413 while calling DiskStore(directory=settings.home / "oauth-proxy").

This is a known flaky test issue on Windows where DiskStore initialization can hang, likely due to Windows file locking or slow disk I/O in the GitHub Actions runner.

Suggested Solution:

This test failure is environmental and specific to Windows CI runners. The PR code changes are safe to merge as they only affect display logic. To address the flaky test:

  1. Mark the test as potentially slow on Windows: Add a pytest marker or increase timeout for this specific test on Windows
  2. Investigate DiskStore initialization: The OAuth proxy DiskStore initialization may need special handling on Windows (e.g., different directory, async initialization)
  3. Consider mocking: For unit tests of provider initialization, mock the DiskStore to avoid filesystem operations
Detailed Analysis

Test that failed: tests\server\auth\providers\test_github.py::TestGitHubProvider::test_init_defaults

Timeout location: Line 36 in test file, during GitHubProvider() initialization

Why unrelated to PR:

  • PR only modifies src/fastmcp/utilities/cli.py to add version info to banner display
  • No changes to auth providers, OAuth proxy, or disk storage
  • Ubuntu and Python 3.13 tests passed successfully
  • Only Windows Python 3.10 test failed with timeout

Test behavior:

  • Passes on Ubuntu (as seen in other jobs)
  • Times out on Windows after 5 seconds
  • Gets stuck in database initialization within diskcache library
Related Files
  • tests/server/auth/providers/test_github.py:36 - Test that timed out
  • src/fastmcp/server/auth/oauth_proxy/proxy.py:413 - DiskStore initialization
  • src/fastmcp/server/auth/providers/github.py:221 - GitHubProvider init calling parent

The issue is in the test infrastructure, not the code being tested or the PR changes.


🤖 This analysis was generated by the FastMCP test triage bot

@jlowin jlowin merged commit d5f5300 into PrefectHQ:main Feb 4, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to FastMCP CLI commands (run, dev, install) or CLI functionality. enhancement Improvement to existing functionality. For issues and smaller PR improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display server version on banner

2 participants