feat(data-connect): Add Wire Protocol and Stub Methods for New Transport Implementation#9618
feat(data-connect): Add Wire Protocol and Stub Methods for New Transport Implementation#9618stephenarosaj merged 15 commits intopasta/mainfrom
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 lays the groundwork for supporting new Data Connect transport implementations by introducing a robust abstraction layer. It establishes core interfaces and an abstract base class for transports, along with a manager to orchestrate them. Additionally, it defines the wire protocol for a future transport implementation and refactors the existing REST transport for better organization, preparing the system for diverse communication methods. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request lays a solid foundation for the new transport implementation by introducing a transport manager, an abstract transport, and the wire protocol. The code is well-structured, but there are a couple of areas for improvement. I've identified a critical type mismatch in the RESTTransport implementation that violates the transport interface contract, which should be addressed. Additionally, there's an opportunity to clean up the DataConnectTransportManager constructor for better maintainability. My detailed feedback is in the comments below.
Description
✨ This PR establishes the foundation for a new Data Connect transport support. It introduces the core wire protocol interfaces and a new abstract base class that future concrete implementations will extend.
There are no functionality changes for this PR. This is just to get a foundation which we can add functionality on top of.
Changes
[NEW]
wire.ts: Defines interfaces for requests and responses over the new transport protocol.**[NEW] Introduces a new abstract class which implements
DataConnectTransportInterface.openConnection,closeConnection,sendMessage.invokeQuery,invokeMutation,invokeSubscribe,invokeUnsubscribeto throwDataConnectError (OTHER / Not Implemented)for now.Renames:
RestTransport.ts-->restTransport.tsDataConnectTransport.ts-->transport.ts