refactor(server)!: remove Starlette and FastAPI utilities and rely only on routes#867
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines the server's architecture by decoupling it from specific web frameworks like Starlette and FastAPI. It introduces a new, modular routing system that centralizes the definition and handling of A2A protocol endpoints. This change enhances maintainability, improves flexibility for integrating with various ASGI frameworks, and simplifies the overall server implementation by consolidating request dispatching logic. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully refactors the server's HTTP application components, moving from dedicated FastAPI/Starlette application classes to a more modular route-based structure. This change streamlines the architecture by centralizing route definitions and dispatching logic. Several application and handler files were removed, and new route-specific modules were introduced, along with corresponding updates in imports and test fixtures across the codebase. Overall, the refactor improves modularity and simplifies the integration of HTTP frameworks by relying solely on route definitions.
However, I've identified a few minor issues related to consistency in __all__ exports, error messages, and a potential oversight in passing modifiers to a compatibility adapter. There are also a couple of bugs in the new test files that need to be addressed.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly: